I found this question when I tried to figure out what kind of subgroups of a free abelian group behave just as well as in the finitely generated case.

Let $M$ be a free abelian group and $N$ a subgroup of $M$. Suppose that $M/N$ is a direct sum of cyclic groups. Can we always find a basis $\{x_i\}_{i\in I}$ of $M$ such that $N=\bigoplus_{i\in I}(N\cap\mathbb Zx_i)$?

My attempt: I feel it's true so I tried to prove it. Let $\varphi$ denote the canonical projection $M\to M/N$. To begin with, I'd like to consider a special case that $M/N$ is $p$-primary for a certain prime number $p$.

First, define a property $P$ on elements of $M$: for any $x\in M$, $P(x)$ is true iff for any $y\in M$ and $n\in\mathbb Z$, $ny=x$ implies $y\in\ker\varphi$. Using Zorn's Lemma, we can find a maximal submodule $L_1$ of $M$ consisting of elements satisfying $P$.

Second, define a property $Q$ on submodules of $M$: for any $L\leqslant M$, $Q(L)$ is true iff $L$ is generated by some $\{a_i\}_{i\in I}$ such that $M/N=\bigoplus_{i\in I}\mathbb Z\varphi(a_i)$. I proved that $\{a_i\}_{i\in I}$ constructed above is always linearly independent (by considering at a time a certain finitely generated subgroup of $M$).

I want to show that there is a maximal submodule $L_2$ of $M$ subject to $Q$ and that $M=L_1\oplus L_2$, but I got stuck here.

Any thought will be appreciated.