A problem about an $R$-module that is both injective and projective.
As you remarked, injective modules are divisible, that is, $rM=M$ for all $r\in R$, $r\ne 0$.
The key step is to show that every non-zero homomorphism $f:M\to R$ is surjective. Let $x\in M$ such that $f(x)\ne 0$. Set $r=f(x)$. Since $rM=M$ there exists $y\in M$ such that $ry=x$. Then $rf(y)=r$, so $f(y)=1$, and this is enough.
Now use that $M$ is projective: there exists $F$ a free module of base $(e_i)_{i\in I}$ such that $0\to M\to F$. Consider $p_i:F\to Re_i\cong R$ the canonical projection. If $M\ne 0$ there is an $i\in I$ such that $p_i(M)\ne 0$, so the homomorphism $M\to F\stackrel{p_i}\to R\stackrel{r\cdot}\to R$ is non-zero for each $r\in R$, $r\ne 0$. This homomorphism must be surjective, so $1=rp_i(z)$ for some $z\in M$, and this shows that $R$ is a field, a contradiction.