Here is the problem I was trying to solve :
I thought this was easy. For calculating rank , as usual I row reduced the matrix $B$ and rank turned out be $1$ but the null space turned out to be $2$. Clearly, the rank nullity theorem was violated. I Googled the problem and found out that rank was $2$, and they proved it by taking $4\times 4$ coordinate matrix of basis elements instead. Why does this need to be solved differently? What did I do wrong? Simply row reducing matrix worked out until now for me.

The matrix $B$ is not the matrix of $T$ with respect to some basis. In order to find such a matrix, you have to fix a basis of $\Bbb C^{2\times2}$ and then to work with it.
Or you can see that a basis of $\Bbb C^{2\times2}$ is $\left\{\left[\begin{smallmatrix}1&0\\0&0\end{smallmatrix}\right],\left[\begin{smallmatrix}0&1\\0&0\end{smallmatrix}\right],\left[\begin{smallmatrix}0&0\\1&0\end{smallmatrix}\right],\left[\begin{smallmatrix}0&0\\0&1\end{smallmatrix}\right]\right\}$ and to see what's the dimension of$$\operatorname{span}\left(\left\{T\left(\begin{bmatrix}1&0\\0&0\end{bmatrix}\right),T\left(\begin{bmatrix}0&1\\0&0\end{bmatrix}\right),T\left(\begin{bmatrix}0&0\\1&0\end{bmatrix}\right),T\left(\begin{bmatrix}0&0\\0&1\end{bmatrix}\right)\right\}\right).$$