$\displaystyle \frac{\text{d}z}{\text{d}x} = \frac{2a(x-z)}{1-ax}$ where $a$ is a constant. $(x>0, a\ne 0)$
So after rewriting the above as $\displaystyle \frac{\text{d}z}{\text{d}x} + \frac{2az}{1-ax} = \frac{2ax}{1-ax}$ I tried using an integrating factor of $\displaystyle \frac{1}{(1-ax)^2}$ to solve this, but I end up with a really long polynomial expression that I'm certain is incorrect. Any hints would be greatly appreciated!
You are on the right track. Multiplying both sides and factor out $-1$ we get $$\frac{\text{d}z}{\text{d}x}\frac{1}{(ax-1)^2}-\frac{2az}{(ax-1)^3}=\frac{2ax}{(1-ax)^3}$$Now, by product rule $$\frac{\text{d}}{\text{d}x}\left(\frac{z}{(ax-1)^2}\right)=-\frac{2ax}{(ax-1)^3}$$Integrating both sides with respect to $x$ we get$$\frac{z}{(ax-1)^2}=\frac{2ax-1}{a(ax-1)^2}+C$$
Eventually, $\displaystyle \boxed{z=2x-\frac{1}{a}+C(ax-1)^2}$.