Recall that a module $M_R$ is called Dedekind-finite if $fg=1 \Longrightarrow gf=1$ for every $f,g\in \text{End}(M_R)$.
It can be easily seen that any cyclic module $M$ over a commutative ring $R$ is Dedekind-finite.
Proof. Let $M=aR$ be a cyclic module over a commutative ring $R$. Let $f,g\in \text{End}(M)$ be such that $fg=1$. Put $f(a)=as$ and $g(a)=at$ for some $s,t\in R$. We need to prove that $gf=1$. Note, using the commutativity of $R$, that $gf(a)=g(as)=g(a)s=ats=ast=f(a)t=f(at)=fg(a)=a$. Hence, $gf(x)=x$ for every $x\in M$, i.e. $gf=1$. Therefore, $M_R$ is Dedekind-finite.
I ask if this result can be extended to finitely generated modules, i.e. is every finitely generated module over a commutative ring Dedekind-finite?