This is often given as an equivalent property to $M$ being a flat $R-$module (for instance in one of the answers here Are $I\otimes_{R}J$ and $IJ$ isomorphic as $R$-modules?). Certainly we can always map $I\otimes_R M \rightarrow IM$ by sending $i\otimes m $ to $im$, but it's not clear to me why (or if) this map has trivial kernel or how this relates to the flatness of $M$.
I have also tried thinking about exact sequences, for instance maybe we can start with an exact sequence of the form
$0\rightarrow I \rightarrow N$
for some module $N$ and then tensor by $M$. This would give the desired result since $M$ is flat, but it's not clear to me what the module $N$ would be since we would need to have $N\otimes_R M\cong IM$.
Thanks in advance!