Let's do the easy part first:

Suppose $x$ is a unit in $R$, so that there is $u \in R$ with $ux = 1$. Let $N = Rb_2$. I claim $M = Rm \oplus Rb_2$.

To see this, first we show that $M = Rm + Rb_2$. So let $a = c_1b_1 + c_2b_2$ be any element of $M$.

Then we have:

$(c_1u)m + (c_2 - c_1)b_2 = c_1u(xb_1 + xb_2) + c_2b_2 - c_1b_1 = c_1(ux)b_1 + c_1(ux)b_2 + c_2b_2 - c_1b_1 = c_1b_1 + c_1b_2 + c_2b_2 - c_1b_2 = c_1b_1 + c_2b_2 = a$

Next, we show that $Rm \cap Rb_2 = \{0\}$. For if $rm = sb_2$ (for $r,s \in R$) then since $\{b_1,b_2\}$ is a basis for $M$, this means: $rxb_1 + rxb_2 = 0b_1 + sb_2$ so that:

$rx = 0$, and since $x$ is a unit, and $R$ is a domain, $r = 0$.

Now suppose we have $M = Rm \oplus N$. Then $N = Rn$, for some $n \in N$.

If $n = yb_1 + zb_2$, then certainly we have:

$c_1b_1 + c_1b_2 \in M$ with: $c_1b_1 + c_1b_2 = a_1m + a_2n = (a_1x + a_2y)b_1 + (a_1x + a_2z)b_2$ so that: $a_2(y - z) = 0$.

Since $Rm \cap Rn = \{0\}$, if $c_1 \neq 0$, then we must have $a_2 = 0$ (or else $y = z$, and thus $Rm \cap Rn \neq \{0\}$).

In particular, $b_1 + b_2 = a_1m = a_1xb_1 + a_1xb_2$ so that $a_1x = 1$, that is: $x$ is a unit.