For a finite-dimensional $\mathcal{H}$ with $\dim \mathcal{H} = n$ we have an isomorphism $B(\mathcal{H} \otimes \mathcal{H}) \cong \mathcal{H} \otimes \mathcal{H} \otimes \mathcal{H}^* \otimes \mathcal{H}^*$, so for some aspects it is important to view elements of $B(\mathcal{H} \otimes \mathcal{H})$ as $4$-tensors.
If $M \in B(\mathcal{H} \otimes \mathcal{H})$, then I will write $M^{ij}_{kl}$ for the coordinates of this tensor, with the top indices corresponding to contravariant ($\mathcal{H}$) factors, and bottom indices corresponding to covariant ($\mathcal{H}^*$) factors.
Your problem does not need this, it is a matrix rank problem in disguise.
But to understand how to form a matrix, it is useful to look at our $4$-tensor.
There are different ways to group factors in the tensor product $\mathcal{H} \otimes \mathcal{H} \otimes \mathcal{H}^* \otimes \mathcal{H}^*$.
If we look at $M \in B(\mathcal{H} \otimes \mathcal{H})$ as a linear map and form a matrix of this linear map, we essentially use the grouping $\mathcal{H} \otimes \mathcal{H} \otimes \mathcal{H}^* \otimes \mathcal{H}^* = (\mathcal{H} \otimes \mathcal{H}) \otimes (\mathcal{H}^* \otimes \mathcal{H}^*)$ to get from a $4$-tensor of format $n \times n \times n \times n$ to a matrix ($2$-tensor) of size $n^2 \times n^2$. This is not what we need.
To see if $M \in B(\mathcal{H} \otimes \mathcal{H})$ can be represented as $M = A \otimes B$ with $A, B \in B(\mathcal{H})$, we use isomorphism $B(\mathcal{H} \otimes \mathcal{H}) \cong B(\mathcal{H}) \otimes B(\mathcal{H})$, which in the tensor language corresponds to the isomorphism $$\mathcal{H} \otimes \mathcal{H} \otimes \mathcal{H}^* \otimes \mathcal{H}^* \cong (\mathcal{H} \otimes \mathcal{H}^*) \otimes (\mathcal{H} \otimes \mathcal{H}^*)$$ where the first and the third factors are grouped into one side, and the second and the fourth - into the other.
In coordinates, the element $M \in B(\mathcal{H} \otimes \mathcal{H})$ corresponds to a $n^2 \times n^2$ matrix $\mathbf{M} = (m_{ik, jl})$ with entries $m_{ik, jl} = M^{ij}_{kl}$
If $M = A \otimes B$ with $A, B \in B(\mathcal{H})$, then we have $M^{ij}_{kl} = A^i_k B^j_l$. Equivalently, $m_{ik, jl} = a_{ik} b_{jl}$ (here $a$ and $b$ are $n^2$-dimensional vectors corresponding to the matrices $A$ and $B$), which means that the matrix $\mathbf{M}$ is of rank at most $1$.
There are many way to check it, for example, by checking the minors of $\mathbf{M}$, getting the following: the decomposition $M = A \otimes B$ exists if and only if $$M^{ij}_{kl} M^{pq}_{rs} - M^{iq}_{ks} M^{pj}_{rl} = 0$$ (for all values of indices).
I stress again that the matrix $\mathbf{M}$ is not the matrix of $M$ as a linear operator, but corresponds to a different rearrangement of components $M^{ij}_{kl}$.
For example, consider $\mathcal{H} = \mathbb{C}^2$ and $M = I \otimes I$. As a linear map, $M$ is the identity and has a full rank (rank $4$) matrix. But the matrix $\mathbf{M}$ constructed above will have rank $1$. We have $$M^{ij}_{kl} = \begin{cases}1 & \text{if $i = k$ and $j = l$,} \\ 0 & \text{otherwise}.\end{cases}$$ We have $m_{ik, jl} = 1$ if and only if $ik \in \{11, 22\}$ and $jl \in \{11, 22\}$, and $$\mathbf{M} = \begin{bmatrix}1 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 1\end{bmatrix}.$$
Here the order of rows and columns is $11, 12, 21, 22$.