Let $A$ be a commutative $\mathbb Z$-algebra and $M$ be a $\mathbb Z\oplus \mathbb Z$-module. Then $A\otimes_{\mathbb Z} M$ is an $A\oplus A$-module. Is it true that $(A\oplus A)\otimes_{\mathbb Z\oplus \mathbb Z} M \cong A\otimes_{\mathbb Z} M$ as $A\oplus A$-modules? It seems to me that the map given by $(a_1, a_2)\times m \mapsto a_1\otimes_{\mathbb Z} (1,0)m + a_2\otimes_{\mathbb Z} (0,1) m$ defines a map in one direction, and that the map $a\times m\rightarrow (a,a)\otimes_{\mathbb Z\oplus \mathbb Z} m$ defines its inverse.
More generally, is it true/ is there a slick reason that given commutative unital $R$-algebras $A$, $B$ and $C$ such that $B\cong A\otimes_{R} C$, and a $C$-module $M$, we have $B\otimes_C M\cong A\otimes_{R} M$ as $B$-modules?