Consider the example:
$$\frac{7}{x} = 0$$
If we multiply both sides by $x$ we get
$$7 = 0$$
which obviously is wrong.
However with the equation
$$\frac{7x^2 - 67x +126}{x(x-2)(x-3)} = 0$$
You can multiply by zero and get
$$7x^2 -67x + 126 = 0$$
I think it is because there are still $x$'s remaining in the expression. However what is the exact rule when it is allowed to multiply by zero and when it is not...
An equation of the form $$\frac{f(x)}{x} =g(x)$$ can only make sense when $x\ne 0$. You’re free to multiply with $x$ here. However, for an equation of the form $$f(x)=g(x) $$ You can only divide by $x$ if you know that $x\ne 0$. Note that there is no restriction on multiplying here, too. As for your first equation, $$\frac 7x=0$$ has no solutions.