Let be an integral domain, and let be a nonprincipal ideal of , considered as a (left, unital) -module. Prove that has rank 1 over but is not free as an -module.
Let be a subset containing two nonzero elements. Since , is not linearly independent. Thus the rank of as an -module is at most 1. Since is an integral domain, every (nonzero) singleton set is linearly independent; hence has rank 1.
Suppose is free. Then must have free rank 1, since any free generating set is linearly independent. That is, for some . But then is principal, a contradiction.