$M=\mathbb{Z}/2018\mathbb{Z}$ is not a projective $\mathbb{Z}$-module.
I know that $\mathbb{Z}$ is a PID and therefore any projective $\mathbb{Z}$-module is also free. $M$ is not a free $\mathbb{Z}$-module, which proves the statement.
Now, I want to show this differently. Consider the natural projection $\pi: \mathbb{Z}\to M$. Claim: there is no $\sigma: M\to\mathbb{Z}$ such that $\pi\circ\sigma=\operatorname{id}_M $.
Do I have to specify $\sigma$? I feel like I should somehow find a nonzero element that is mapped to zero (or the other way around). How can I approach this?
Thanks.
For any homomorphism $\sigma: M\to \mathbb Z$, you would have to have $2018\sigma(x)=\sigma(2018x)=0$ for every $x\in M$. But if $0\neq \sigma(x)\in \mathbb Z$, $2018\sigma(x)\neq 0$ either.
So in fact, $\sigma=0$ in every case.