Let $K$ be a field. Consider the free $K$-algebra on two generators $x,y$. Its unit group is $K^*$, hence commutative, but $x,y$ don't commute.
Here is a more explicit example: Consider the ring of upper-triangular $2 \times 2$-matrices over $\mathbb{F}_2$. It has $8$ elements and it is in fact the smallest noncommutative ring. The unit group has just two elements, namely the identity matrix and $\begin{pmatrix} 1 & 1 \\\ 0 & 1 \end{pmatrix}$. A group of order $2$ is commutative.