From Grillet's Abstract Algebra, section VIII.5.
Definitions. A division ring is a ring with identity in which every nonzero element is a unit. A vector space is a unital module over a division ring.
Theorem 5.2. Every vector space has a basis.
Exercises.
(7.) Show that $R$ is a division ring if and only if it has no left ideal $L \neq 0, R$.
(*9.) Prove that $R$ is a division ring if and only if every left $R$-module is free.
I'm trying to solve exercise 9. I suspect it should be formulated:
Let $R$ be a unital ring. Then $R$ is a division ring $\iff$ every unital left $R$-module is free.
Attempt of proof: $(\implies)$: Theorem 5.2.
$(\impliedby)$: By exercise 7, it suffices to show that every non-zero left ideal of $R$ is equal to $R$. Let $I\!\neq\!0$ be a left ideal. As a $R$-module, $I$ has a basis $B$.
How can I show that $I=R$?
Best Answer
I will paraphrase Pete Clark's "Commutative algebra" notes (pp. 24-25), available here.
As Julian's answer and Amitesh's comment point out, if $R$ is a commutative ring, then if $R$ was not a field, there would exist a two-sided proper ideal $I$. Then $R/I$ would be a nontrivial $R$-module with $0\not=I=ann(R/I)$, whence $R/I$ would be a nonfree $R$-module.
For the noncommutative case: a ring with no nonzero proper twosided ideals may admit a nonfree module. Prof. Clark constructs an example: I quote,
At the end he asserts what you have been trying to prove. As mentioned by him in the comments, this is expanded in his noncommutative algebra notes, p.6:
Every left $R$-module is free $\Rightarrow$ $R$ is a division ring: