Let $G$ be a finite abelian $p$-group. It is quite elementary to see that if $g \in G$ is an element of maximal order (and thus its span is a cyclic subgroup of $G$ of maximal order) then $G$ can be written as the direct sum $G=\langle g \rangle \oplus H$ for some $H \leq G$ (subgroup of $G$). For a proof see this for example (page 2).
My question: Do we need that $G$ is a $p$-group or does it also work for arbitrary finite abelian groups?
I think it is wrong for general groups because I looked around quite a bit and always only found the above theorem, but I could not find a counter-example.