Taken from Hungerford Exercise IV.3.14.
Let $D$ be a ring with identity such that every unitary $D$-module is free. Show that $D$ is a division ring.
The hint says we can show that $D$ has no nonzero maximal left ideal. Suppose that $I$ is such ideal. I can see (which is also hinted) that $I\oplus J=D$ for some left ideal $J$.
How do we deduce the contradiction?
Is it because $1_R$ is in $I$ or $J$, making one the whole $R$, but both have to be proper too?
If it is true, when is the maximality of $I$ needed?
Notes: I have seen this problem handled here and somewhere else, but: 1. I could not really understand the answers, 2. I am trying to use the hint.
Thanks for the guidance.