No.. wrong.

IF a vehicle is travelling in the opposite direction to you with their high beam on (intentionally OR accidentally because they have forgotten to take them off) you ARE permitted to flash your high beam in their direction to hopefully give them the hint to dip theirs down.

As for flashing your highbeam whilst travelling behind someone my mate says this "A few flashes is not classified as road rage ie. 3 at most. Anymore then 3 flashes would be classified as negligent driving endangering other road users as there is a chance of blinding other road users."

So it is not outright (as you claim) illegal!