As the comments discuss, the claim that $S$ is invertible if $A$ is invertible as claimed in the question is false. What is true is that:
Theorem: If $A$ is invertible, then $S$ is invertible if and only if the Schur complement $D-CA^{-1}B$ is invertible. In which case, the stated formula for the inverse of $S$ in $2\times 2$ block form holds.
So $A$ does not need to be invertible for $S$ to be invertible, but if $A$ is, then $D-CA^{-1}B$ must be invertible as well for $S$ to be invertible.
As the OP notes with their example $\begin{bmatrix}0&1\\1&0\end{bmatrix}$, the top-left matrix need not be invertible for $S$ to be invertible. Instead, for $S$ to be invertible, it just has to be possible for one to reorder the rows and columns of the matrix $S$ (left- and right-multiplying by permutation matrices) to bring a nonsingular matrix $A$ into the block $(1,1)$-position and the resulting reordered Schur complement $D-CA^{-1}B$ to be nonsingular. Indeed, the additional cases in Elias’ answer all boil down to reordering the rows and columns of $S$ to put either $B$, $C$, or $D$ into the top-left spot and then applying the theorem.
An important observation is that one only needs to reorder the rows of $S$ to check invertibility of $S$, the core observation behind LU factorization with partial pivoting:
Theorem: Fix $k$ between $1$ and the size of $S$, $S$ is invertible if and only if it is possible to find a permutation matrix $P$ where $PS$ has block form $PS=\begin{bmatrix} A&B\\C&D\end{bmatrix}$, with $A$ being $k\times k$ and $A$ and $D-CA^{-1}B$ are invertible.