The simplest way to balance it - is to increase amount of monsters by CR of your NPC. Basiacally, if I get you right - it's your first option. It's an easy solution, but you should be careful if your NPC is significantly more powerful or weaker than PCs.
Party of 4 1-st level character have a planned encounter with 4 CR 1/4 enemies. If your party has a 1/4 CR NPC extra - you can just drop fifth 1/4 CR enemy to encounter and everything would be balanced.
But if your NPC is 1 CR - dropping 1 CR monster in addition to those four 1/4 CRs or 4 more 1/4 CRs - may make your encounter deadly for PCs or make encounter focused on your NPC, who effortlessly slays everyone.
And, of course, if you have 4 PCs of 10-th level and NPC of 2 CR - you should sort of discourage players from taking him into combat, as it may be too deadly for him.
Converting NPC's CR into player levels gives a bit more flexibility - you may not have to alter encounters, just give less xp for them due to extra help they have. You just need to be careful - CR guidance is a loose thing by itself, IMHO, because some monsters are stronger than those of an equal CR, and converting CRs into levels is an aproximate thing. So you may need to use a bit of personal judgement and ask whether this NPC really feels like a character of this level, based on his abilities or not.
The last option - most difficult to pull off, but more spectacular if done right - is to roleplay it. Let them take NPC to their adventure, but have him break away from party to scout things before encounter and return with some valuable information after. During some encounter - describe him getting into 'sniper duel' with some enemy, who is out of PCs' reach. Instead of having PCs to kill some enemy group to get further - describe some devious trap that needs to be disarmed right now and have the NPC do it, while players deal with enemies. Of course, you can combine this approach with any of previous ones for better immersion and to avoid turning him into plot device in every fight.