Let $X$ be a locally Noetherian scheme and $U, V$ be two open subsets of $X$ containing the same associated points of $X$. (the associated points of $X$ lying in $U$ are the same as the associated points of $X$ lying in $V$). It is well- known that there are injections
$$\mathcal O_X(U) \to \prod_{associated~p \in U}\mathcal O_{X,p},$$ $$\mathcal O_X(V) \to \prod_{associated~p \in V}\mathcal O_{X,p}.$$
Does it follows from here that $\mathcal O_X(U) \cong \mathcal O_X(V)$ as two rings?
No, this is totally false. For instance, when $X$ is integral, the only associated point is the generic point, which is contained in every nonempty open set. So your question would be whether $\mathcal{O}_X(U)$ and $\mathcal{O}_X(V)$ are isomorphic for all nonempty open subsets $U,V\subseteq X$. This is obviously false (e.g., let $X=\operatorname{Spec}\mathbb{Z}$, let $U=X$, and let $V=D(2)$, so $\mathcal{O}_X(U)=\mathbb{Z}$ and $\mathcal{O}_X(V)=\mathbb{Z}[1/2]$).