So, I can't find a way to use a name tag on a villager to keep him from despawning. (I'm on singleplayer) Will renaming the spawn egg have the same effect?
First of all, villagers don't despawn. But to answer your question, no, a mob spawned from a renamed spawn egg will despawn as normal. According to the wiki:
A monster which has been named with a name tag will not despawn. However, one created from a renamed spawn egg will despawn as normal.
But let's not just take the wiki's word for it. Let's do some SCIENCE to find out for sure.
For this test, I'll rename a zombie spawn egg, spawn him in a little box, teleport at least 128 blocks away, and then teleport back. If the wiki is to be trusted, that zombie will be gone when I get back.
Testing this theory in a creative world confirms what the wiki says. However, villagers and other passive mobs do not despawn, so you really don't need to worry.
You actually can name BABY villagers. Spawn in a villager,and right click it with the villager spawn egg. You will have a baby villager. THEN you name it and it won't despawn.
Villagers don't despawn, no need to worry about that.
However, to answer your question, yes. You can rename any spawn egg, use it, and the mob that you spawned will not disappear unless killed.