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. 


If
$$
I\_1 ⊊I\_2⊊\cdots⊊I\_n⊊\cdots
$$
is an infinite properly ascending chain of ideals of $R$, then for all $n$ let $E\_n=E(R/I\_n)$ be an injective envelope of $R/I\_n$, and let $E=\bigoplus\_{n\ge 1} E\_n$. Then $E$ is a direct sum of injective modules and $E$ is not itself injective.
How to prove that $E$ itself is not injective?



The direct sum of injective modules need not be injective
The standard proof that I am aware of is actually explicit in this regard.


As you note, assume that $I\_1\subsetneq I\_2\subsetneq\cdots$ is an infinite ascending chain of ideals of $R$, let $E(R/I\_n)$ be the injective envelope of $R/I\_n$ for each $n$, and let $$E=\bigoplus\_{n=1}^{\infty}E(R/I\_n)$$
be the their direct sum.


Let $I=\bigcup\limits\_{i=1}^{\infty} I\_n$. 


For each $n$, let $f\_n$ be the composition of the embedding $I\hookrightarrow R$ with the canonical map $R\to E(R/I\_n)$ (map to the quotient, then embed into the envelope). 


Since we have a map from $I$ to each $E(R/I\_n)$, we obtain a map $f\colon I\to \mathop{\prod}\limits\_{n=1}^{\infty}E(R/I\_n)$ by the universal property of the product. In fact, the image of $f$ lies in the direct sum, since for every $x\in I$ there exists $n\in\mathbb{N}$ such that $x\in I\_m$ for all $m\geq n$, hence the image of $x$ is $0$ in $R/I\_n$. So we have a map $I\to E$. 


I claim that $f$ does not extend to a module homomorphism $\overline{f}\colon R\to E$ (which it would necessarily do if $E$ were injective). Assume to the contrary that we have an extension $\overline{f}\colon R\to E$. Being a module homomorphism with domain the free module of rank $1$, it is completely determined by $\overline{f}(1)$, and so it has the form $\overline{f}(x) = xe$ for all $x\in R$, where $e=\overline{f}(1)\in E$. 


Now, let $n\_0$ be a positive integer such that the $m$th component of $e$ is $0$ for all $m\geq n\_0$. Let $x\in I\_{n\_0}\setminus I\_{n\_0-1}$. When we map $x$ to $R/I\_{n\_0}$, we obtain a nonzero element; hence the $n\_0$th component of $f(x)$ must be nonzero (since $R/I\_{n\_0})$ embeds into $E(R/I\_{n\_0})$). But $f(x) = \overline{f}(x) = xe$, and the $n\_0$th component of $e$ is $0$, hence so is that of $f(x)$, a contradiction.


The contradiction arises from the assumption that we can extend the map $f\colon I\to E$ to a module homomorphism $R\to E$. Hence no such extension exists, so $E$ is not injective.


