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?