Was this 10th-level NPC put in the party 1) by your-as-DM choice, or 2) by player/PC request or recruiting, or 3) by the module itself?
IME if it's 1) things rarely if ever work out well, and if it does for you this time you're probably rather lucky; if it's 2) the players kind of brought it on themselves; and 3) sometimes can't be avoided if running a module as written (e.g. in the original ToEE the party has the opportunity of rescuing (or waking up?) a Paladin who is likely to be at least double the party's average level).
I try to make party-member NPCs at or slightly below the average party level when they come in, and they progress from there just like a PC would. If a party NPC isn't needed any more, or - as happened in an adventure I ran not too long ago - the part accumulates a bunch of them, I'm quick to pull the trigger on retiring them. (once back in town the 'bunch' all left to form their own all-NPC adventuring party, which gives me some potentially handy plot options to work with later

)