Let $P$ be a prime ideal of a ring $R$. Let $M$ and $N$ be $R$-modules, and let $f:M \rightarrow N$ be a module homomorphism. Let $f_P: M_P \rightarrow N_P$ be defined by $f_P \left(\frac{m}{s} \right) = \frac{f(m)}{s}$. I want to show that $f$ is an isomorphism if and only if $f_P$ is an isomorphism, for all $P$. I proved the forward direction, but am stuck going the other way. When I try setting $f(m) = 0$, I end up with $\frac{0}{1} = \frac{f(m)}{1}$ and $sm = 0$ for some $s \in R \setminus P$, but since I'm not assuming $M$ is torsion free, this doesn't give me injectivity. My other idea was to set up the diagram
$\require{AMScd}$ \begin{CD} 0 @>>> M @>>> M_P @>>> M_P / M @>>> 0 \\ @VVV & @VfVV @Vf_PVV & @VVV & @VVV\\ 0 @>>> N @>>> N_P @>>> N_P / N @>>> 0 \end{CD}
and appeal to the five lemma, but I'm not convinced the obvious maps in the rows are exact; requiring the natural isomorphisms $M \rightarrow M_P$ and $N \rightarrow N_P$ to be injective seems equivalent to requiring $M$ to be torsion free.
The proposition as you stated is false. When discussing local properties, you always need all prime ideals. Assuming that is what you meant, let's see how we can deduce this then.
The result is an easy consequence that localization is an exact functor. Let $f: A \to B$, $g: B \to C$ such that there is an exact sequence
$$A \to B \to C$$
Claim that $S^{-1} A \to S^{-1} B \to S^{-1} C$ is exact. It's clear that $\text{im } S^{-1} f \subseteq \ker S^{-1} g$. So now start with $b/s$ in the kernel. Then $g(b)/s = 0$ so there is a an $s \in S$ such that $sg(b) =g(sb) = 0$ in $C$, i.e. $sb \in \ker g$ which is the image of $f$.
Now an isomorphism fits into an exact sequence by saying $M \cong N$ if and only if $0 \to M \to N \to 0$ is exact. Thus if $M \cong N$ then apply the functor $S^{-1}$, where $S = R - p$.
Conversely, suppose $M_p \cong N_p$. Show that $M \to N$ is both injective and surjective separately. You can do this by considering the exact sequences
$$0 \to K \to M \to N$$ and $$M \to N \to C \to 0$$
where $K$ and $C$ are the kernel and cokernel respectively.
Apply the localization functor and use the fact that for an $R$-module $T$, $T = 0 \Leftrightarrow T_p = 0$ for all prime ideals $p$.