I believe it is also free for the p-adic integers $\mathbb{Z}_p$.I believe it is also free for the p-adic integers $\mathbb{Z}_p$.
By restricting to the underlying additive group $G$ of the ring, you certainly require any Cartesian product of copies of $G$ to be isomorphic to some direct sum of copies of $G$, and this itself is an interesting question. For finitely generated abelian groups, I believe it holds if and only if the group has rank 0 (i.e. is torsion), this should follow easily from things you've mentioned already.
(Incidentally, in the world of non-abelian groups, I'm not sure if it holds for $Q_8$ or $D_8$.)