This question is fairly general (I'm actually interested in a more specific setting, which I'll mention later), and I've found similar questions/answers on here but they don't seem to answer the following:
Let $R$ be a ring. Are there any simple conditions on $R$-modules $M, A$ and $B$ to ensure that $M \oplus A \cong M \oplus B$ implies $A \cong B$?
This is obviously not true in general: a simple counterexample is given by $ M= \bigoplus_{n \in \mathbb{N}} \mathbb{Z}, A = \mathbb{Z}, B = 0 $. In the more specific setting that I'm interested in, $R$ is noetherian, each module is finitely generated, reflexive and satisfies $\text{Ext}_R^n(M,R) = 0$ for $n \geqslant 1$ (or replacing $M$ with $A$ or $B$), and $A$ is projective. In this case, do we have the desired result?
This is well-studied under the heading of "cancellability," and Lam's crash course on the topic is very nice.
The readiest one is that if $R$ has stable range 1 and $M$ is finitely generated and projective, then it cancels from $M\oplus A\cong M\oplus B$. You can find this, for example, in Lam's First course in noncommutative rings theorem 20.13. Examples of rings with stable range 1 include right Artinian rings (and in increasing order of generality, right perfect, semiprimary, semiperfect, and semilocal rings.)
As for conditions on $M_R$, you can say that $M$ cancels if $End(M_R)$ is a ring with stable range 1.