I am not sure this is possible. It seems that Larian has back-up plans that are hard-written to kick in for some specific NPCs, and thus you can't resurrect anyone.
In my case, a non-party NPC died in a battle, and before I could try to revivify him, a new NPC appeared, lamented on the death of the first one, and proceeded to say his lines. So, story-wise, that makes it nearly absolutely impossible to resurrect the dead one. (I think I tried on his body, but it didn't work.)
It's a bit sad (though far from being the biggest issue with the story, the story-telling and immersion).
I can see how it's convenient for Larian : it reduces the number of permutations in the unfolding of the story.
- If a critical NPC dies, they don't allow you to continue running the game with that NPC staying in a dead state (imagine a player who doesn't think of, or doesn't want to resurrect that NPC). Instead, Larian immediately switch you to a different story path.
- If a non-critical NPC dies ... I guess they've just disabled revivify on everyone who is not a party-member. It saves them from assessing, for every single NPC, whether they should make that NPC resurrectable, what the implications would be, etc. Brutal, but efficient.
On the other hand, for us players, it means that the Rules Of The Game Universe have a variable geometry. Resurrection is available or unavailable depending on whether the desired target is a playable character or not, because the gods (i.e. the devs) have said so. It is not very consistent story-wise. But if they avoid having resurrection play any part in the story, then we can just close our eyes, pretend that resurrection is not a thing in this world, and we just have access to it for our character because it's a video game. Basically, it's a quality-of-life feature that saves us from instantly reloading if we won a fight but lost someone in the battle.