If $0\rightarrow R^{\oplus a}\rightarrow M\rightarrow R^{\oplus b}\rightarrow 0$ is exact, then $M\simeq R^{\oplus (a+b)}$ Let $R$ be a commutative ring with unit, and let $M$ be an $R$-module. Is it true that if
$$
0\rightarrow R^{\oplus a}\rightarrow M\rightarrow R^{\oplus b}\rightarrow 0
$$
is exact, then $M\simeq R^{\oplus (a+b)}$?

Yes.
Call the maps $\phi: R^{\oplus a} \to M$ and $\psi:M \to R^{\oplus b}$.
We can define a section $\sigma:R^{\oplus b} \to M$  of $\psi$ as follows: let $e_i$ ($i=1,\ldots,b$) be the natural basis of $R^{\oplus b}$. Since $\psi$ is surjective, choose $f_i$ mapping to $e_i$ (i.e. such that $\psi(f_i)=e_i$).
Define $\sigma(e_i)=f_i$ Then $\psi \circ \sigma = \mathrm{id}_{R^{\oplus b}}$. 
Then we can define an isomorphism $\alpha:R^{\oplus a} \oplus R^{\oplus b} \to M$ by $\phi + \sigma$.
