The rank of a matrix is maximal the size of its nonzero minors, and the cofactors are up to a sign equal to the $(n-1)\times(n-1)$ minors of $A$. So if the rank of $A$ is less than $n-1$, none of the cofactors are nonzero, and the rank of $B$ is zero. On the other hand if the rank of $A$ is $n$, then $A$ is invertible and $B$ is up to a nonzero scalar $\det A$ and transpostion equal to the inverse of $A$, so also invertible and of rank $n$. So the only interesting case is when the rank of $A$ is $n-1$: now $\det A=0$ but at least one cofactor of $A$ is nonzero, so that one has $B\neq0$ but $AB^t=0$. The latter means that the image of $B^t$ is contained in the kernel of$~A$; this kernel is of dimension$~1$ by the assumption on the rank of$~A$, so in fact the image of$~B^t$ and the kernel of$~A$ must coincide, and the rank of $B^t$ (and of$~B$) is$~1$.
Note that $\operatorname{rank}(B)=1$ usually means that $B$ is not invertible (like $A$, whose rank was suppose to be less than $n$ in this case), but for $n=1$ it means that $B$ is invertible.