Let us give the full proof, which is the same as Aryeh's, but extends it so that it does not require that $P(z,x) > 0$ for all states $z$.
Hence, as in Aryeh's proof (repeated below for the sake of completeness), let us consider $a$ and $b$, two stationary distributions. Also let $x$ the minimizer of $z \mapsto a(z)/b(z)$ and call $r=a(x)/b(x)$. Clearly it has to be the case that $r < \infty$ since by stationarity and irreducibility it holds that $b(z) > 0$ for all $z$. We get:
$$
\begin{aligned}
a(x) &= \sum_z a(z)P(z,x) \\
&= \sum_{z} \frac{a(z)}{b(z)}b(z) P(z,x) \\
&\geq \sum_{z} r b(z) P(z,x)\\
&= r \sum_z b(z) P(z,x) \\
&= r b(x)\\
&= a(x)
\end{aligned}
$$
But for equality to hold throughout the whole expression, we need equality to hold for all summands in the inequality ($\geq$) of line 3.
This implies that $\frac{a(z)}{b(z)}P(z,x) = rP(z,x)$ for all $z$. In particular, for all $z$ such that $P(z,x)>0$ we get that $\frac{a(z)}{b(z)}=r$.
However, to conclude, we need this to hold for all $z$, not just the ones with $P(z,x) > 0$.
Let us pick another $z$ such that $P(z,x)=0$. By irreducibility of the chain, there exists however some $n$ such that $P^n(z,x) > 0$, where $P^n$ denotes the $n$-step transition probabilities.
Repeating the same argument as above with the $n$-step Chapman-Kolmogorov equations (i.e. $a(x) = \sum_z a(z)P^n(z,x)$), we see that also $a(z)/b(z)=r$.
Hence $a(z)/b(z)=a(x)/b(x)$ holds for all states $z$, and since $\sum a(z)=\sum b(z)=1$ we conclude that $a=b$.