I am porting this question across from StackExchange, since it has received no answers and perhaps is sufficiently deep to fit here.

I am considering the set of upper triangular matrices $$D_N=\left\{\begin{pmatrix}a&b\\0&d\end{pmatrix}:a,b,d\in\mathbb{Z}, ad=N, \gcd(a,b,d)=1, 0\leq b<d\right\}.$$ Standard facts tell us that this is a set of representatives for $M_N$ under the action of $\operatorname{SL}_2(\mathbb{Z})$ from the left. ($M_N$ being the set of primitive integer matrices of determinant $N$.)

There is also an action of $\operatorname{SL}_2(\mathbb{Z})$ on $D_N$ from the right.

Namely, given $g\in D_N$ and $\gamma\in\operatorname{SL}_2(\mathbb{Z})$, the matrix $g\gamma$ is still a primitive integer matrix of determinant $N$, and hence takes the form $\gamma' h$ for some $\gamma'\in\operatorname{SL}_2(\mathbb{Z})$ and unique $h\in D_N$. So let $\gamma$ act on $D_N$ by sending each $g$ to the corresponding $h$.

The question is: is this action transitive? I thought this was a standard fact, and one seems to need it to prove that the $N$th modular polynomial $\Phi_N$ is irreducible (among other things).

However, I can't seem to find a reference for it, and after struggling for a time to prove it, I am increasingly pessimistic - it seems to rely on some properties of the "3-variable Euclidean algorithm" that I'm not certain I believe in.

(It would be enough to know, for instance, that one can write $$a\lambda m + bmn + dn\mu=1,$$ for some integers $\lambda, \mu,m,n$, but this doesn't seem particularly likely to hold in general - the Euclidean algorithm gets us close to this but not quite there.)