Linear algebra over principal rings

Consider an extension $R\subseteq S$ of commutative rings, and suppose that $R$ is principal (i.e., $0$ is the only zero-divisor of $R$ and every ideal of $R$ has a generating set of cardinality $1$). By means of scalar restriction we consider $S$ as an $R$-module. Let $M$ be a sub-$R$-module of finite type of $S$ containing $R$.

In this situation, Gilmer and Heinzer claim (in Remark 2 in their article "On the complete integral closure of an integral domain") that there exists an $R$-module $N$ containing $M$ such that $R$ is a direct summand of $N$.

Their argument is just the remark that $M$ "has a linearly independent module basis containing the identity of $R$".

Unfortunately, I cannot follow this argument, nor can I prove the claim in a different way. Even worse, I meanwhile have the feeling that the claim is not true.

Does someone know either a proof of this claim or a counterexample?

I think that I have a counterexample. Let $R=\mathbb Z$, $S=\mathbb Q$ and $M= 1/2 \mathbb{Z}$. The induced map $R/2 R \rightarrow M/2M$ is zero. If $R$ is a direct summand of some $N$ the $R/2R\rightarrow N/2N$ is non-zero. Hence, $R\subset M\subset N$ implies that $R$ cannot be a direct summand of $N$, since $R/2R \rightarrow N/2N$ factors through $R/2R \rightarrow M/2M$.