Let $R$ be a ring (commutative, unital) and $M$ an $R$-module. Let $I \subset R$ be an ideal. We make the following definitions:
$$ A := \{ am \ | \ a \in I,\ m \in M \} $$ $$ B := \left\{ \sum_{\text{finite}} a_i m_i \ | \ a \in I,\ m \in M \right\} $$
Clearly $A \subset B$, and if $I$ is a principal ideal then $B \subset A$ too. I came up with the following counterexample to $B \subset A$ for when $I$ is not principal:
Let $R = k[x_1, x_2, \dotsc]$ be the polynomial ring in infinitely many variables, $M$ be the $R$-submodule of $R$ consisting of those polynomials with zero constant term (and $0$), and $I = (x_1,x_2) \subset R$.
Then $p = x_1 x_3 + x_2 x_4 \in B$, but it is not in $A$. (For if there are $f \in I, g \in M$ such that $fg = p$, then $\deg f = \deg g = 1$ and we can check that there are in fact no such $f$ and $g$.)
Here I haven't actually used the non-Noetherianness of $k[x_1,x_2,\dotsc]$; $R = k[x_1, \dotsc, x_4]$ would have done just as nicely. This counterexample also generalizes to $R = k[x_1, \dotsc, x_{2n}],\ I = (x_1,\dotsc,x_n)$. But it's all pretty ad-hoc to me at the moment, are there any simpler/more general counterexamples?
Incidentally, am I right in assuming that the notation $IM$, for $I$ and $M$ as in the first sentence is to be read in the sense of $B$?
For another (in my opinion simpler, but certainly not more general) example:
What about $R= \mathbb{Z}[X]$, $M = (Y) \subset \mathbb{Z}[X,Y]$.
Now take $I = (2,X)$. Then $2Y^2 + XY \in B$, $2Y^2 + XY \notin A$
Even simpler: take $R$, $I$ as above and $M=I$.
$4+X^2 \in B = I^2$, but $4+X^2 \notin A$.