Let $f$ be a bounded function in $L^{2}(X,\mathcal A,\mu)$ such that $f^{2}$ is not a scalar multiple of $f$. Let $M$ be the one dimensional subspace generated by $f$. If $M$ has the desired form then $f^{2}$ is an $L^{2}$ function measurable w.r.t. $\mathcal B$ so it must belong to $M$. This is a contradiction.