For any right ideal $I\subseteq R$, let $I_A\subseteq A$ denote the right ideal formed from the top left entries of elements of $I$. Similarly let $I_B\subseteq B$ denote the right ideal formed from the bottom right entries of elements of $I$.
Then a right ideal $I\subseteq R$ is superfluous if and only if the ideals $I_A\subseteq A, I_B\subseteq B$ are both superfluous.
Proof:
If $I\subseteq R$ is a superfluous ideal, then we know that $I_A$ is superfluous, as otherwise we would have $J_A+I_A=A$ for some proper ideal $J_A\subset A$. Then the ideal:
$$J=\left\{\left(\begin{array}{cc}
a&m\\0&b
\end{array}\right)
|a\in J_A, b\in B, m\in M \in M
\right\},
$$
is a proper ideal of $R$, but $I+J=R$, contradicting that $I$ was superfluous.
Thus we know that $I_A$ is superfluous, and the same argument gives that $I_B$ is superfluous.
Conversely suppose that $I_A,I_B$ are superfluous. We will show that $I$ is superfluous.
If $I+J=R$ then the top left entries of elements of $J$ form an ideal $J_A\subseteq A$, and $I+J_A=A$ so $J'=A$. Similarly the bottom right entries of elements of $J$ are all of $B$. We conclude that $J=R$.
It may be helpful to note that in the above proof we use that if an ideal $K\subseteq R$ contains elements $$\left(\begin{array}{cc}
1&m\\0&b
\end{array}\right),\qquad\left(\begin{array}{cc}
a&m'\\0&1
\end{array}\right)
$$
then $K=R$. This follows from the fact that right multiplication by an upper triangular matrix can zero out either column, leaving the other column the same.