In my opinion:
Firstly, ghosts are not the actual dead, and Necromancy is thus not necessary to deal with them (though it can certainly be used to do so, ala Corpsetaker). Secondly, Harry didn't actually compel the ghosts to do anything, he just sorta pointed out their murderers and helped break said murderers protections.
Secondly, in regards to paralysis then murder. In my opinion, the reason that Lawbreaking corrupts is the level of pure belief that has to go into a spell. To work magic you must believe it to be right. Completely. No shadow of a doubt. Believing it is right to physically restrain someone, not so much a problem. Killing someone mundanely? Still no problem. Believing in the rightness of their death enough to kill them with magic (which would include releasing them over a 10 story fall, because you know what will happen, and you need to believe in it to release them)? Problem.