Proof Verification: If $R$ is a commutative ring and $I$ an ideal, then $(R/I)^n\cong (R/I)^m$ as $R$-modules iff $n=m$ My argument is as follows:
Let $R$ be a commutative ring with unity, $I$ an ideal of $R$.
If $(R/I)^n\cong (R/I)^m$ as $R$-modules, then it follows that they are isomorphic as $R/I$-modules because the isomorphism factors through the quotient. We observe that these are both free $R/I$-modules with bases $${\mathfrak{B}_1=\{\delta_{1j}+I, \delta_{2j}+I, \dots, \delta_{nj}+I\} \;\;\text{ and }\;\; \mathfrak{B}_2=\{\delta_{1j}+I, \delta_{2j}+I, \dots, \delta_{mj}+I\}}$$ respectively.
Then the isomorphism between $(R/I)^n \cong (R/I)^m$ as $R$-modules induces an isomorphism of these free modules, meaning there is a bijection between the elements of $\mathfrak{B}_1$ and $\mathfrak{B}_2$. It follows then that $n=m$.
 A: I would say there are two different points at stake here.


*

*If $M$ and $N$ are two $R/I$-modules, then they are isomorphic iff they are isomorphic as $R$-modules. I think you explained that correctly.

*If $A$ is any commutative ring (here $A=R/I$) then $A^n\simeq A^m$ as $A$-modules iff $n=m$. This is a more delicate result, and I am not sure you understood it properly. The way you wrote your proof seems to assume that an isomorphism will necessarily induce a bijection between the bases you chose, which is clearly not true. One way to show this is to take any maximal ideal $\mathfrak{m}$ of $A$, and take the quotient, which gives an isomorphism $(A/\mathfrak{m})^n\simeq (A/\mathfrak{m})^m$, and since those are vector spaces over $A/\mathfrak{m}$, we can use basic linear algebra to conclude that $n=m$. (See also $R^n \cong R^m$ iff $n=m$)
A: More generally, you've essentially showed the following: 

Let $R \rightarrow S$ be an epimorphism of rings.  Then $S^m \cong S^n$ as $R$-modules iff $m = n$.  

Indeed, the $R$-module isomorphism extends to an $S$-module isomorphism $S^m \otimes_R S\cong S^n \otimes_R S$.  Since tensor products commute with direct sums, you get an isomorphism $(S \otimes_R S)^m \cong (S \otimes_R S)^n$.  Since $R \rightarrow S$ is an epimorphism, the multiplication map $S \otimes_R S \rightarrow S$ is an isomorphism.  Finally conclude $m = n$ because commutative rings have IBN (do make sure that you understand that part of the argument.  As Captain Lama noted, your reasoning there was faulty).  
This naturally raises the question

Can it happen that $S^m \cong S^n$ and $m \not= n$ when $R \rightarrow S$ is not an epimorphism?

Yes, it can. Consider for example any ring $R$ and the ring $S = R^\mathbb{N}$ (product of countably many copies of $\mathbb{N}$).  
We have an $R$-module isomorphism $S^2 \cong S$ given by $\big((r_1, r_2, \ldots), (q_1, q_2, \ldots) \big) \leadsto (r_1, q_1, r_2, q_2, \ldots)$.
