Is exercise 2.22 (iii) in Rotman's Homological Algebra book wrong? I believe that the statement of exercise 2.22 in Rotman's Introduction to Homological Algebra is wrong. It states that if $R$ is an integral domain, $M$ is an $R$-module, and $\textrm{Hom}_{R}(M,R/I) = 0$ for all non-zero ideals $I$ of $R$, then $\textrm{Hom}_R(M,R) = 0$.
If $R$ is a field, then the only non-zero ideal is $(1)$ and $\textrm{Hom}_{R}(M,R/(1))$ is trivially zero, but $\textrm{Hom}_R(M,R)$ need not be.
Am I right that the exercise is mistaken? I did not find a correction in the errata.
Edit: Thank you metalspringpro for your answer. The exercise is correct when we exclude the possibility that $R$ is a field. To see this one can use the following statement: If the intersection of all non-zero ideals of an integral domain R is non-zero, show that R is a field.

Yes, but it's a rather small mistake; the case you point out is the only one where there is an issue. To fix it, change the claim to

If $R$ is an integral domain and not a field, $M$ is an $R$-module, and $\operatorname{Hom}_R(M,R/I)=0$ for all non-zero ideals of $R$, then $\operatorname{Hom}_R(M,R)=0$.

