We already saw that an abelian group with a $\Z$-direct summand is projective over its endomorphism ring. Finitely generated abelian groups are also projective over their endomorphism rings by essentially the same argument. What's an example of an abelian group that is not projective over its endomorphism ring?

Here's one: the multiplicative group $Z(p^\infty)$ of all $p$-power roots of unity. Another way to define this group is $\Z[p^{-1}]/\Z$. What is the endomorphism ring of this group? In fact *it is the $p$-adic integers $\Z_p$*. Indeed, an endomorphism $Z(p^\infty)\to\Z(p^\infty)$ has to send $1/p$ to an element $a_1$ such that $pa_1 = 0$. So we have the choice of the elements $0/p, 1/p,\cdots, (p-1)/p$, which form the cyclic subgroup $\Z/p$.

Similarly, $1/p^2$ has to be sent to an element $a_2$ such that $p^2a_2 = 0$, but also $pa_2 = a_1$. So $a_2$ has to be of the form $n/p^2$ where $n\in \Z$; in other words, $a_2$ can be in the cyclic subgroup $\Z/p^2$ generated by $1/p^2$. Hence, an endomorphism of $Z(p^\infty)$ is specified by an element of the inverse system $\cdots\to \Z/p^3\to \Z/p^2\to \Z/p$ where the transition maps are multiplication by $p$: in other words the $p$-adic integers $\Z_p$.

Now, we see that $Z(p^\infty)$ **cannot** be a projective $\Z_p$-module. Indeed, $\Z_p$ is a local ring and hence any projective $\Z_p$-module is in fact free (Kaplansky's theorem) and in particular torsionfree. However, $Z(p^\infty)$ has nothing but torsion! In fact we can say more: since $\Z_p$ is a principal ideal domain, it has global dimension one, so the projective dimension of $Z(p^\infty)$ as a $\Z_p$-module is one.