I am asked to find an example of a ring $R$ and $R$-module $M$ and $N$ such that $M_p \cong N_p$ for all prime ideal $P$ in $R$ but $M$ is not isomorphic to $N$.
My idea is as follows: Recall that if $S$ is a multiplicative subset of a commutative ring $R$ with identity and $I$ is an ideal of $R$, then $S^{-1}I = S^{-1}R$ if and only if $S \cap I \neq \emptyset$. For reference, this is Theorem 4.8 in Chapter 3 of Hungerford's algebra. I have seen people suggest that if $R$ is a non-principal Dedekind domain and $I\subset R$ a non-principal ideal, then for every prime ideal $p$ of $R$ and $S = R\setminus p$, we know that $S \cap I \neq \emptyset$. Why is this the case? Once this is known, the result immediately follows.
For a concrete example, recall that $R=\mathbb{R}[x,y]/(x^2+y^2-1)$ is a Dedekind domain. Furthermore, $I = (x-1,y)$ cannot be generated by a single element.
Note that $M_p = S^{-1}M$, where $S = R \setminus p$.