The problem is that you perform a noninvertible transformation on the equation by scaling it by $\,3,\,$ because $\,3\,$ is noninvertible mod $\,9.\,$ Doing that will generally introduce extraneous roots. Indeed $\!\bmod 9\!:\ 2x\equiv 3\,\Rightarrow\, 6x\equiv 9\equiv 0,\,$ and $\,6x\equiv 0\!\iff\! 9\mid 6x\!\iff\! 3\mid 2x\!\iff\! 3\mid x\, $ (not $\,9\mid x).$ Now $\,3\mid x\!\iff\! x\equiv \color{#c00}{0,3},6\pmod{\! 9},\,$ but $\,x\equiv \color{#c00}{0,3}\,$ are not roots of $\,2x\equiv 3\pmod{\! 9},\,$ even though they are roots of $\,6x\equiv 9.$
But if we scale by an invertible $\,a\,$ then $\,bx\equiv c\,\smash[t]{\underset{\color{#c00}{\ \times\ a^{-1}}}{\color{#c00}{\Longleftarrow}}\!\!\color{#0a0}{\overset{\times\ a}\Longrightarrow}} \ abx\equiv ac,\,$ since the direction $\,(\color{#c00}{\Longleftarrow})$ follows by multiplying the RHS by $\,\color{#c00}{a^{-1}}.\,$ So the LHS and RHS congruences have exactly the same set of roots. Hence no extraneous roots are introduced by scaling by an invertible element, i.e. the scaled congruence is equivalent to the original congruence.