If $R$ is a ring and $M$ and $N$ are $R$-modules (on the same side) for which the rings $End_R(M)$, $End_R(N)$, and $End_R(M \oplus N)$ are commutative, must $Hom_R(M,N)$ and $Hom_R(N,M)$ vanish?
One case where the question has a positive answer is when $R$ is the ring $\mathbf{Z}$ and $M$ and $N$ are (possibly infinite) cyclic groups. Indeed, a finitely generated abelian group has a commutative endomorphism ring if and only if it is cyclic, and $M \oplus N$ is cyclic if and only if $M$ and $N$ are finite cyclic groups of coprime orders, or one of them is trivial and the other one is infinite. Then, if $M$ and $N$ are finite cyclic groups of coprime orders, there cannot be any nonzero homomorphism between them in either direction, so the answer is "yes" in this case.
We can write an endomorphism of $M\oplus N$ as a matrix $$\pmatrix{A&B\\C&D}$$ where $A\in\textrm{Hom}(M,M)$, $A\in\textrm{Hom}(M,N)$, $C\in\textrm{Hom}(N,M)$ and $C\in\textrm{Hom}(N,N)$. Suppose $B\in\textrm{Hom}(M,N)$ is not zero. Then the endomorphisms with matrices $$\pmatrix{I&0\\0&0}\qquad\text{and}\qquad\pmatrix{0&B\\0&0}$$ fail to commute.