You don't even need all $a,b$. Let $I$ be the identity matrix and $R = \mathrm{diag}(1,-1) \in O(2)$ is the reflection matrix. 

With the diagonal being $I$, you have
$$ \mathrm{div}(UV^T) = 0 $$
with the diagonal being $R$, you have
$$ \mathrm{div}(UR V^T) = 0 \iff \mathrm{div}(URV^T R) = 0 $$
the latter because you are just multiplying on the right with a constant, full rank, matrix so it commutes with taking the divergence. 

Notice that $RV^TR = V$ by the conjugate action of the reflection on $SO(2)$. 

Locally we can lift $U, V$ to mappings to the Lie algebra, and since $SO(2)$ is abelian we have that for some real valued functions $u,v$

$$ U = \exp(i u), \quad V = \exp(i v) $$

and that $UV^T = \exp(i(u-v))$ and $UV = \exp(i(u+v))$. 

You have that
$$ 0 = \mathrm{div}(UV^T) VU^T = d(u-v) $$
and similarly
$$ 0 = \mathrm{div}(UV) V^T U^T = d(u+v) $$
adding and subtracting you find $du = dv = 0$.