TITLE: Do commutative rings without unity have the IBN property?
QUESTION [10 upvotes]: Let $R$ be a commutative rng, i.e. a commutative ring without an identity element.

Does $R$ still have the Invariant Basis Number (IBN) property?

Recall that a ring is said to have the IBN property if $R^m \cong R^n \Rightarrow m=n$.
All commutative rings have the IBN property, but the standard proof I know makes an essential use of the existence of a maximal ideal by Zorn's Lemma and passing to the residue field, which depends on the presence of a unit.

REPLY [16 votes]: (I will write my comment as an answer.)
The answer is "not necessarily" for the way IBN is defined in the problem. For a counterexample, let $R=\oplus^{\omega} \mathbb Z$
with zero multiplication. 
But the definition of IBN in the problem is not the right one. It IS true that when $R$ is a commutative nonunital ring, the f.g. free $R$-modules have uniquely determined rank. The reason is that, when $R_1$ is the ring obtained from $R$ be formally adding a unit element, then the forgetful functor from the category of $R_1$-modules to the category of $R$-modules is an equivalence. The free $n$-generated $R$-module is $R_1^n$, not $R^n$.