Suppose $D$ is a PID and $M,N$ are $D$-modules and we have $\varphi_1:D\longrightarrow M$ and $\varphi_2:D\longrightarrow N$ isomorphism.
Then if I take $\varphi:D\oplus D\longrightarrow M\oplus N$, $\varphi(x,y)=\left(\varphi_1(x),\varphi_2(y)\right)$ we have an isomorphism if I am not mistaken.
My questions are:
Does it hold when, for example, $N\simeq D/(d)$, with $(d)$ a principal ideal of $D$, then $M\oplus N\simeq D\oplus D/(d)$?
Does it hold if $D$ is not a PID?
For the first one the answer is no. Let $D=\mathbb{Z}$ and $d$ be any positive integer then $\mathbb{Z}\oplus\mathbb{Z}\not\simeq \mathbb{Z}\oplus \mathbb{Z}/{\langle d\rangle}$, since $\mathbb{Z}\oplus \mathbb{Z}/{\langle d\rangle}$ has an element of finite order whereas $\mathbb{Z}\oplus\mathbb{Z}$ does not have any element of finite order.
For the second, the answer is yes. As the isomorphism $\varphi$ does not depend on the PID property.
I will try to keep the old answer and answer the new one also.
Yes, in this case it is still true (if you needed some more explanation I could give it, but I think it is easy to check)