Example of a non-splitting exact sequence $0 → M → M\oplus N → N → 0$
It took me a while, but I came up with a counterexample myself: $$0 → ℤ \overset α \longrightarrow ℤ \oplus \bigoplus_ℕ ℤ/2ℤ \overset β \longrightarrow \bigoplus_ℕ ℤ/2ℤ → 0,$$ with
- $α$ being multiplication by $2$ (postcomposed by the natural inclusion)
- $β$ being given on the left summand as the projection $ℤ → ℤ/2ℤ$ (postcomposed by the inclusion into the first summand) and on the right summand as a right shift.
More concretely, set $M = ℤ$ and $N = \bigoplus_ℕ ℤ/2ℤ$
\begin{align*} α&\colon M → M \oplus N,~k ↦ (2k,0)\\ β&\colon M \oplus N → N,~ (k,(κ_1,κ_2,…)) ↦ ([k]_2,κ_1,κ_2,…) \end{align*} Now $\ker β = 2ℤ \oplus 0 = \operatorname{img} α$, because for all $x = (k,κ) ∈ M \oplus N$ with $κ = (κ_1,κ_2,…)$ $$ β(x) = 0 ⇔ ([k]_2,κ_1,κ_2,…) = 0 ⇔ k ∈ 2ℤ~\text{and}~κ = 0.$$
The sequence doesn’t split, though, because the element $x = (1,0,0,…)$ in $N$ has order $2$, but there is no element of order $2$ in $β^{-1}(x) = (1,0) + \ker β = (1,0) + (2ℤ\oplus 0)$, so there cannot be any linear map $s \colon N → M \oplus N$ with $(β∘s) (x) = x$ (as $β∘s$ strictly decreases the order of $x$).