I have come across a theorem which states that if the underlying ring $R$ is a principal ideal domain then every $R$-module $P$ which is projective is free also.
But the problem is I have encountered the example of $\mathbb{Z}_2$ over $\mathbb{Z}_6$ which is projective but not free. But $\mathbb{Z}_6$ is a PID.
Then how is the theorem true?
$\mathbb{Z}/6\mathbb{Z}$ is not a PID, because it's not a domain.