Let $A$ be a commutative ring with $1$, $M$ an $A$-module and $N_1,N_2$ two submodules. It is easy to see that $$N_1\cap N_2=(0)\implies N_1+N_2\cong N_1\oplus N_2.$$ I am trying to understand if the converse is true given that $N_1$ and $N_2$ are finitely generated.
If we don't make this assumption, then it's possible to produce a counterexample. Consider, for example, the $\mathbb{Z}$-module $M=\prod_{n\in\mathbb{N}}\mathbb{Z}$ with component-wise addition and scalar multiplication, and let $N_1=\mathbb{Z}\times0\times0\times\cdots$ and $N_2=M$. Then, $N_1+N_2=M\cong N_1\oplus N_2$ but clearly, $N_1\cap N_2\neq(0)$, so in this case, the converse implication is not true. However, I haven't been able to find a counterexample in the case when both $N_1$ and $N_2$ are finitely generated. Any help would be greatly appreciated!