This is coming from a graduate-level abstract algebra class, for reference. My professor says that given two groups $G,H$ we say $D$ is the direct sum of $G$ and $H$ and write $C = G \oplus H$ if $G$ and $H$ are disjoint except for zero and $C = G+H = \{g+h | g \in G, h \in H\}$.
My issue is that this isn't really a definition, since for arbitrary groups $G$ and $H$ that aren't necessarily disjoint, this isn't defined. For example, I have an assignment question to show that the direct sum of two modules with a certain property still has that property, but I don't see how the direct sum is defined for arbitrary modules. For example, what would $\mathbb{Z}_3 \oplus \mathbb{Z_2}$ be?
For arbitrary modules $M, N$ over a ring $A$, there's a external direct sum module $M\boxplus N = \{(m, n):\, m\in M, n\in N\}$ with operation $(m, n) + (m', n') = (m + m, n + n')$ and $A$-action $a(n, m) = (an, am)$. The resulting module has $M\boxplus N = M\oplus N$ in your notation, embedding $M$ and $N$ in $M\boxplus N$ in the obvious way. Furthermore, if $P = M\oplus N$, then the map $P \to M\boxplus N$ defined by $m + n \to (m, n)$ is a well-defined isomorphism (injectivity following from the fact $M\cap N = 0$). As such, the two types of direct sum usually aren't distinguished in nomenclature or notation.