Here's a look in a particular game setting for hints of how this could be handled:
In The Elder Scrolls III: Morrowind, undead spirits are used to guard family tombs from would-be graverobbers, fuel the sacred Ghostfence which holds back the worst of the evil demons and diseases of the Ash Blight of Dagoth Ur on Red Mountain, and serve as living memory in the necropolis city of Necrom (where the ghost of the legendary hero Indoril Nerevar still haunts – despite blasphemous rumours of his reincarnation).
While Necromancy is still legal in the Septim Empire at large in 3E 427, it has been banned by the Imperial Guild of Mages and is illegal within the independent Province of Morrowind. But the native Dunmer seem to practice their own form of ancestor worship and manipulation that looks a LOT like Necromancy. Their translation of the word Necromancy instead refers to acts seeking to defile the dead and summon them for nefarious purposes. And the Dunmer Wizards of House Telvanni don't care at all about the law or religious mores: amongst many abominations, they actively engage in necromantic experiments. To them, you're either strong enough to enforce your authority, or you never were worthy of that power to begin with.
So a Dunmer House Redoran (warrior clan) Bouyant Armiger (Paladin Oath of Heroism) devoted to the Tribunal Temple may be publicly and personally opposed to acts of Necromancy, and yet enlist the services of a Telvanni Wizard who practices Necromancy (Wizard, School of Necromancy) to face a much greater evil, such as the Blight of Dagoth Ur, or outlander raiders, or House Hlaalu (thief clan) or even Sixth House smugglers defiling her family crypt. Maybe she needs the Necromancer to speak with her dead ancestors to gain insight into her enemies, or to awaken the spirits of her dead ancestors to rout out the smugglers defiling her family crypt.
This is just one setting idea, but the possibilities are endless if you both work together and with your DM to make sure this party, their purposes, and the setting details align.