Create an ad hoc buff or timed ability system (or just use a buff system that features "getting buffs types") that consist in giving the affected unit the 'Apiv' or 'Agho' (permanent invisibility or ghost) abilities. Or you can just turn the source of invisibility (an ability i guess) to consist in just giving such abilities to the unit, instead of using WW/SM/Sorceress Invisibility directly.
Con: this will recquire to recreate such abilities if you are planning to use them.
If you are just referencing invisibility in abstract and not relating to classic invisibility W3 abilities, this could be a nice opportunity to create an invisibility system, and the previous approach will have no drawbacks.
So to break it from invisibility, at any time, you should remove the buff type (if you use a system, by getting the created buff type), removing the added ability.
I think this is the cleanest method. Most buff sytems (there are very few tho) will allow you to get created buff types, allowing you to directly modifyng them (like removing them on demand, modifyng their values, etc).
If you use WEX and like vJass, you could use this system, as it allows you to get buffs easily:
[vJASS] - Buff System
EDIT: this already have been said, but a dummy caster (with 0 collision) that casts a 0 area dust of appareance (order id is 852625) should reveal a single unit (please test this).