If $M\bigoplus N$ is a submodule of $A\bigoplus B$ does it necessarily imply either $M$ is a submodule of $A$ or $M$ is a submodule of $B$?
If in general it is not true, is it true if $M$ and $N$ are $\mathbb Z$-modules?
I tried finding counter examples when they are $\mathbb Z$-modules but did not succeed.
No,
Let $A,B = \mathbb{Z}$ as $\mathbb{Z}$-modules. Let $M$ be the submodule of $A\oplus B$ generated by $(2,1)$ and let $N$ be the submodule generated by $(0,1).$ Then $M\oplus N \subset A\oplus B$ but $M$ is not a subset of $A$ or $B.$