Let $R$ be a commutative ring, and let $N\leq M$ be $R$-modules. Then, suppose $M$ and $N$ are free over $R$, if $R$ is an integral domain, then -considering the fraction modules over the quotient field of R- $$\text{rank}_R N\leq \text{rank}_R M$$ However, I wonder what is the case when $R$ is not an integral domain, can we guarantee the above inequality? Or are there examples of how that is not accomplished in general?
Observation: Whenever $\text{rank}_RM=1$, I know tha statement is true since $$M\cong R$$ And in that case, we know that every free $R$-submodule of $R$ is zero or a principal ideal generated by a non-zero divisor element, so we obtain the desire inequality.
Note: For me, ring and unitarian ring are the same thing.