Projective and injective modules; direct sums and products

As for the first question: yes, $P = \prod_{i=1}^{\infty} \mathbb{Z}$ is a direct product of free $\mathbb{Z}$-modules which is not free. Since $\mathbb{Z}$ is a PID, $P$ is also not projective. The proof that $P$ is not free is nontrivial, but I believe it has already been given either here or on MathOverflow.

As for the second question: the Bass-Papp Theorem asserts that a commutative ring $R$ is Noetherian iff every direct sum of injective $R$-modules is injective. Thus every non-Noetherian ring carries a counterexample. The proof of the result -- given for instance in $\S 8.9$ of these notes -- is reasonably constructive: if

$I_1 \subsetneq I_2 \subsetneq \ldots \subsetneq I_n \subsetneq \ldots$

is an infinite properly ascending chain of ideals of $R$, then for all $n$ let $E_n = E(R/I_n)$ be the injective envelope (see $\S 3.6.5$ of loc. cit.) of $R/I_n$, and let $E = \bigoplus_{n=1}^{\infty} E_n$. Then $E$ is a direct sum of injective modules and (an argument given in the notes shows) that $E$ is not itself injective.