During vaermina quest in skyrim I could either get 'skull of corruption' or make Erandur follow me.... Is there a way to make it both to get the deadric artifact also make Erandur follow me?
Yes and no. If you are trying for the Oblivion Walker achievement you will need to collect the skull of corruption (or take advantage of a bug in another quest).
If you just want one to play around while saving Erandur, you can just use a console command if you are on the PC to give yourself one:
player.additem 35066 1
You can only get one or the other. I killed Erandur and got the skull on my latest playthrough so that I could get the oblivion walker achievement, but if you don't want the achievement I would advise sparing Erandur because the skull of corruption is a trash weapon anyway, it has 20 base damage (which can be increased to 50, but if you have good one handed, two handed or destruction that's still not great).