Let $k$ be an arbitrary field, $R = k[X,Y]$ a polynomial ring and $\mathfrak{m} = (X,Y)$ an ideal. Let us consider $R$ and $\mathfrak{m}$ as $R$-modules. I want to prove that if $f:M\rightarrow M'$ is an injective $R$-module homomorphism, that $f\otimes \operatorname{Id}: M\otimes_R \mathfrak{m}\rightarrow M'\otimes_R\mathfrak{m}$ is injective. I wrote down a proof but I feel this is incorrect, since I do not really use that we have $\mathfrak{m}$ but rather an arbitrary module and this statement does not hold for arbitrary modules. So here is the proof
Let $f:M\rightarrow M'$ be an injective $R$-module homomorphism. Let us consider $f\otimes \operatorname{Id}: M\otimes_R \mathfrak{m}\rightarrow M'\otimes_R\mathfrak{m}$. Since $f$ and $\operatorname{Id}$ are homomorphisms, $f\otimes\operatorname{Id}$ is also a homomorphism. By the isomorphism theorems, we have that $\tilde{f}:M\rightarrow\operatorname{Im}f:x\rightarrow f(a)$ is an isomorphism, so $\tilde{f}^{-1}$ as well. Consider now $f^{-1}\otimes \operatorname{Id}:\operatorname{Im}f\otimes_R \mathfrak{m}\rightarrow M\otimes_R\mathfrak{m}$. Now take an elementary tensor $m\otimes n\in M\otimes_R \mathfrak{m}$. Then $$(\tilde{f}^{-1}\otimes \operatorname{Id})( (f\otimes\operatorname{Id})(m\otimes n)) = (\tilde{f}^{-1}\otimes \operatorname{Id})(f(m)\otimes n) = \tilde{f}^{-1}(f(m))\otimes n = m\otimes n$$ Now since every element of $M\otimes_R\mathfrak{m}$ can be generated by elementary tensors, the above holds for arbitrary tensors, hence $f\otimes\operatorname{Id}$ is injective.
At which step am I assuming something which I cannot and why?