It is more general (and thus more useful) than walking numbers that change signs, but slightly dangerous because it only holds for certain operations, which the rule you cited fails to mention.
Background
When we solve an equation, we want to know which values for the variables make the equation true. Any derivation step should leave this set of values unchanged (and hopefully make the equation simpler).
Applying the same operation to both sides of an equation will preserve all existing solutions. However, for some operations, it can add new solutions. For instance, if we take the equation
$$ x = x + 1 $$
and multiply both sides with 0, we get
$$ 0x = 0(x + 1) $$
Clearly, x = 4 is a solution to the transformed equation, but not the original one.
More subtly, if we take the equation
$$ x = 4 $$
and multiply both sides with x, we get
$$xx = 4x$$
Now, x = 0 is a solution for the transformed equation, but not the original one.
The correct rule
Applying any invertible operation to both sides of an equation will leave its set of solutions unchanged. An operation is invertible if it has an inverse operation such that: for every value, applying the operation, and then the inverse operation, will yield the original value.
Proof: We have seen that applying an operation to both sides will preserve existing solutions. Any solution to the original equation will be solution to the transformed one. Because the operation is inverse, we can also apply the inverse operation to the transformed equation, yielding the original one. Therefore, any solution of the transformed equation will also be a solution of the original one. Therefore, both equations have the same solutions.
Now, which operations are invertible?
- Adding any number is invertible (the inverse operation is subtracting that same number).
- Also, multiplying by any number other than 0 is invertible (the inverse operation is dividing by that number).
- One might be tempted to think that taking the square root is the inverse operation of squaring a number - and it is, but only if we know the sign of the original number. (9 is the square of 3, but also the square of -3. To undo squaring, we need to know the sign).
A cautionary tale
I fondly remember when our teacher, who was quite overweight, derived:
Let W be my weight, I my ideal weight, and x my surplus weight. We then have:
$$ W = I + x $$
$$ Wx = (I + x)x $$
$$ 0 = x^2 + (I-W)x $$
$$ \left(\frac{I-W}{2}\right)^2 = x^2 + (I-W)x + \left(\frac{I-W}{2}\right)^2 $$
$$ \left(\frac{I-W}{2}\right)^2 = \left(x + \frac{I-W}{2}\right)^2 $$
$$ \frac{I-W}{2} = x + \frac{I-W}{2} $$
$$ 0 = x $$
So you see, I am not overweight at all!
You should now be able to spot where he cheated.