Suppose we have a (commutative) ring $R$ and an $R$-algebra $S$. Furthermore, suppose that $S\cong R^n$ as $R$-modules, that is, $S$ is free of rank $n$ as an $R$-module. Can we always choose $1$ to be a basis element for $S$? Equivalently, is it necessary that $S/R \cong R^{n-1}$?

If not, how about in the case that $R=\mathbb{Z}$?

This is true in the case $n=1$: if we have a ring homomorphism $\phi: R\to S$ and an $R$-module isomorphism $\psi: S\to R^1$, it's not hard to show that $\phi$ must also be an isomorphism, making $S/R\cong R^0$.

And it is true if $n=2$ and $R=\mathbb{Z}$: in that case it is known that $S\cong \mathbb{Z}[x]/p(x)$, where $p$ is some degree 2 monic polynomial, so that in particular $S$ is generated freely as a $\mathbb{Z}$-module by 1 and $x$.