If $M^{\oplus n} \cong M^{\oplus m}$ then $n=m$ 
Let $M$ be a simple left $R$-module where R is a ring. Is the following statement true? If $M^{\oplus n} \cong M^{\oplus m}$ then $n=m$. 

I have seen some counterexamples for the case where M is not simple but I could not think of one for the case where M is simple. I also couldn't think of any promising approaches to proving the statement. Hints are appreciated.

Probably most basically, $M^n$ has finite composition length, and composition length is an invariant for modules by the Jordan–Hölder theorem.
For another angle, $End(M^n_R)\cong \text{M}_n(End(M_R))$ as algebras over the center of the division ring $End(M_R)$. If $M^n$ and $M^m$ were isomorphic, their endomorphism algebras would be isomorphic too.
More generally, the Krull-Schmidt-Azumaya theorem says that if $\oplus_{i=1}^mM_i\cong \oplus_{i=1}^nN_i$, where the $N_i$'s are indecomposable and the $M_i$'s are strongly indecomposable (which means they have local endomorphism rings) then $n=m$ and the $N_i$'s pair up with $M_j$'s. The endomorphism ring of a simple module is obviously local.
