Given a short exact sequence $0\to F_1 \to F \to F_2\to 0$, one has $pd(F)\leq \max \left( pd(F_1),pd(F_2) \right)$ with equality except when $pd(F_2)=pd(F_1)+1$. Thus,Suppose that $pd_B(M)<\infty$. Then $pd_B(N) = pd_B(M)$.
Now, $N$ is projective if and only if $pd_B(N)=0$. Therefore, one has to ask for $pd_B(M)=0$, which is the same as to say that $M$ is projective as a $B$-module.