To elaborate slightly on @MichaelHardy's comment, from:
$$A\;B^{-1} + B\;A^{-1} = -I$$
consider as well that:
$$(A\;B^{-1})^{-1} = B\;A^{-1}$$
So when we are talking about all possible solutions, these can be generated by finding $M$ such that:
$$M + M^{-1} = -I$$
i.e. an invertible matrix $M$ such that:
$$M^2 + M + I = 0$$
Then if $M$ has the corresponding characteristic root(s), any invertible matrix $B$ can be paired with an invertible matrix $A$ satisfying the desired relation via:
$$A = MB$$
so that $M = A\;B^{-1}$ and $M^{-1} = B\;A^{-1}$.
Added: A few more words about $M$ and its characteristic roots are useful.
Because it satisfies the polynomial above without repeated roots, complex matrix $M$ must be diagonalizable (similar to a diagonal matrix) with eigenvalues in $\{ (-1 \pm i\sqrt{3})/2 \}$, the nontrivial cube roots of unity. So to construct all such $M$, choose how many of each root so that combined we have $n$ the dimension of $M$, and group them along the diagonal of $D$ having those with positive imaginary part before those with negative imaginary part (for the sake of definiteness). Then take for arbitrary invertible complex matrix $P$ the similarity transformation:
$$M = P\; D \; P^{-1}$$
If we wanted to restrict $M$ to real matrices, then its eigenvalues must occur in conjugate pairs. Thus the dimension $n$ must be even and the "real Jordan canonical form" must have diagonal blocks $ \bigl(\begin{smallmatrix}
\frac{-1}{2}&\frac{\sqrt{3}}{2} \\ \frac{-\sqrt{3}}{2}&\frac{-1}{2}
\end{smallmatrix} \bigr)$. Replace $D$ with such a block diagonal matrix and $P$ with an arbitrary invertible real matrix in our above similarity recipe, and you get the construction of all real solutions $M$.