Let $R$ be an integral domain with the property that all modules over $R$ are projective. Does it follow that $R$ is a field? Obviously the converse is true.
If $R$ is not a field, it has a nonzero proper ideal $I$, and $R/I$ is not projective, because it is a nonzero torsion module.
Variation: The canonical projection $R\to R/I$ doesn't split.