Is the direct sum preserved under isomorphism I have edited this based on discussions in the comments:
This really is more of a sanity check and I couldn't seem to find an answer to anything similar anywhere, so apologies if this has already been asked in some form or another.
I have three $R$-submodules $A,B,C$ of an $R$-module $M$ such that $M\cong A\oplus B\oplus C$. I was thinking of $R$ being an integral group ring but I am also curious if this is true for any ring (commutative or non-commutative). I know that $A,B,C$ are free as $R$-mods.
Now suppose further that we have another three $R$-modules $A^\prime,\,B^\prime,C^\prime$. We have isomorphisms $A\cong A^\prime,\,B\cong B^\prime,\,C\cong C^\prime$. From discussions below with Qiaochu Yuan, I am now happy to say that this means $M\cong A^\prime\oplus B^\prime\oplus C^\prime$ also.
My question now is how this affects the bases. If $\mathcal{B}_A,\,\mathcal{B}_B,\,\mathcal{B}_C$ are the bases for $A,\,B,\,C$, respectively, then clearly their union form a basis for $A\oplus B\oplus C$. If $\mathcal{B}_{A^\prime},\,\mathcal{B}_{B^\prime},\,\mathcal{B}_{C^\prime}$ are bases for $A^\prime,\,B^\prime,\,C^\prime$, respectively, does this mean that $\mathcal{B}_{A^\prime}\cup\mathcal{B}_{B^\prime}\cup\mathcal{B}_{C^\prime}$ is a basis for $A^\prime\oplus B^\prime\oplus C^\prime$?
My issue I think is that we seem to be getting LI for free. So obviously the elements in $\mathcal{B}_{A^\prime}$ are LI, as are the elements in $\mathcal{B}_{B^\prime}$ and $\mathcal{B}_{C^\prime}$, but we are now also getting that $\mathcal{B}_{A^\prime}\cup\mathcal{B}_{B^\prime}\cup\mathcal{C}_{C^\prime}$  is a LI set, despite not showing it.
 A: Re: your questions in the comments, the issue here is that to be fully precise about what's going on we need to name some of the maps involved which have not been named up to this point. So, let $A', B', C'$ be free modules, and let $\phi : M \cong A' \oplus B' \oplus C'$ be an isomorphism (where the direct sum here is an external direct sum, to be totally clear). Let
$$i_{A'}, i_{B'}, i_{C'} : A', B', C' \to A' \oplus B' \oplus C'$$
be the inclusion map of each direct summand. Finally let $G_{A'} \subset A', G_{B'} \subset B', G_{C'} \subset C'$ be bases. Then the completely precise claim is that

Claim 1: $i_{A'}(G_{A'}) \cup i_{B'}(G_{B'}) \cup i_{C'}(G_{C'})$ is a basis of $A' \oplus B' \oplus C'$ (and in particular this union is always disjoint), and


Claim 2: $\phi^{-1}(i_{A'}(G_{A'}) \cup i_{B'}(G_{B'}) \cup i_{C'}(G_{C'}))$ is a basis of $M$.

It's a fairly common abuse of notation to leave these maps implicit because naming them and writing them out is annoying and clutters things up most of the time, but in this case we need to to be totally clear about what's going on. Note that it can even be the case that, say, $A' = B' = C'$ and $G_{A'} = G_{B'} = G_{C'}$ and the above still holds, because the inclusion maps into the direct sum are different. So there's no issue with some of them being equal; after the inclusion maps are applied they are necessarily disjoint.
With $A, B, C$ you already specified they were submodules so the direct sum is internal and in this case it's even more common to avoid naming the inclusion maps because $G_{A'} \cup G_{B'} \cup G_{C'}$ is already a subset of $M$ on the nose. This is in the same way that we typically don't bother naming any of the inclusion maps $\mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R} \subset \mathbb{C}$ and are just applying them implicitly all the time.
Re: your original questions, here are some general facts you can try to prove as an exercise.

Claim 3: If $M, N$ are two free modules, $\phi : M \cong N$ is an isomorphism, and $G \subset M$ is a basis of $M$, then $\phi(G)$ is a basis of $N$.


Claim 4: If $M, N$ are two modules, $M', N'$ are two other modules, and $\phi_M : M \cong M'$ and $\phi_N : N \cong N'$ are isomorphisms with inverses $\phi_M^{-1}, \phi_N^{-1}$, then


$$\phi_M \oplus \phi_N : M \oplus N \ni m \oplus n \mapsto \phi_M(m) \oplus \phi_N(n) \in M' \oplus N'$$


is an isomorphism with inverse $\phi_M^{-1} \oplus \phi_N^{-1}$. (The same is true for any number of direct summands, including infinitely many direct summands; for the case of finitely many direct summands it follows from this binary case by induction.)

Claim 4 follows directly from the fact that taking direct sums is a functor; any functor whatsoever sends isomorphisms to isomorphisms.
