Submodules of a free module over a ring $R$ with IBN Let $R$ be a ring with IBN(Invariant Basis Number). Is it true that any submodule of a free left $R$-module is free? I know that it is true when $R$ is PID.
Otherwise, I want to prove that if $0\rightarrow F_n\rightarrow\cdots\rightarrow F_0\rightarrow 0$ is an exact sequence with $F_i$ finitely generated and free, then  $\sum_{i=0}^{n}(-1)^i\operatorname{rank}(F_i)=0$. This is the exercise 3.16 in Rotman's Introduction to Homological Algebra.
 A: A counter example to your assertion:
Let $F$ be a field. Consider the polynomial ring $R=F[X,Y]$. If the ideal $(X,Y)$ were a free $R$-module, it would have single generator $P(X,Y)$, and this generator should have degree $1$ in $X$, degree $1$ in $Y$. But no polynomial $aX+bY+c$ can have $X$ and $Y$ as multiples, for degrees reasons.
For the alternating sum of the ranks in a finite free resolution, I suppose you're in the context of commutative rings. You can proceed by induction:


*

*Base case:  a short exact sequence
$$0\longrightarrow F_2\longrightarrow F_1\longrightarrow F_0\longrightarrow 0$$
splits since $F_0$ is free, hence projective, for $\;F_1\simeq F_0\oplus F_2$, so that $\DeclareMathOperator{\rk}{rank}\;\rk F_1=\rk F_0+\rk F_2$.

*Inductive step: let
\begin{align}
0\longrightarrow F_{n+1}\longrightarrow F_n\longrightarrow \dots\longrightarrow F_2\longrightarrow F_1\longrightarrow F_0\longrightarrow 0
\end{align}
an exact sequence of length $n+1$, and denote $F'_1=\operatorname{F_2\longrightarrow F_1}$. You deduce a split short exact sequence
$$0\longrightarrow F'_1\longrightarrow F_1\longrightarrow F_0\longrightarrow 0$$
and a long exact sequence of length $n$
$$ 0\longrightarrow F_{n+1}\longrightarrow F_n\longrightarrow \dots\longrightarrow F_2\longrightarrow F'_1\longrightarrow 0 $$
to which you can apply the inductive hypothesis after you've shown $F'_1$ is a projective module with constant rank.
A: Any nonzero commutative ring has IBN, but the statement "every submodule of a free $R$-module is itself free" is true for a nonzero commutative ring $R$ if and only if $R$ is a PID. This is because if $a$ is a zero divisor in $R$, then the principal ideal $aR$ (which is isomorphic to $R/\operatorname{Ann}(a)$) is not a free $R$-module, and the equation $yx+(-x)y=0$ shows that no ideal of a commutative ring can be a free module with more than one generator.
However, $yx+(-x)y=0$ is obviously equivalent to the commutativity of $x$ and $y$ (i.e. $xy=yx$), so the above argument fails for non-commutative rings. In fact, the left ideal of $R=\mathbb{Z}<x,y>$, the non-commutative polynomial ring with two variables over the ring of integers, generated by $x$ and $y$ is a free left $R$-module (and likewise, the right ideal generated by $x$ and $y$ is a free right $R$-module)!
