Encounter difficulty is not an exact science.
(Companions from spells and class features are considered in the power level of the characters. Do I include animal companions when calculating difficulty of an encounter?)
NPC allies or allied monsters that are gained in the story, i.e. not from the characters' powers might be relevant.
This analysis concluded that there are very large differences between monsters of the same CR:
The DMG (p. 83) says that the Encounter Building rules assume three to five PCs. Therefore, a few mounts that are much less powerful than the players will not significantly alter the difficulty. Even one or two NPCs can fall in this range if they are not a much higher level than the PCs.
If there are more than one or two NPCs of a similar power level as the PCs or at least one that is significantly more powerful than a single PC, that influence should be considered.
To gauge the power level, rather than calculate a level for the monster, you can calculate the CR of your player characters (DMG p. 274) and compare. I do this routinely in such situations.
If you use multiple monsters in an encounter, you can simply increase their number. E.g. when you planned using four goblins you can add a fifth and it will make the encounter a bit harder but not too much. Note that multiple monsters are more powerful than the sum of their hit points and damage output (due to the action economy, see also DMG p. 82). If you add one NPC and one opponent, this particular effect will be balanced however. I generally build encounters using groups of monsters which works well and can easily be adjusted. It is easier with self-built monsters however, which I will not go into detail here.
If you want to use a single monster, but stronger you need to be careful since it potentially be more lethal than anticipated (see Challenge Rating sidebar, DMG p. 82). The same considerations apply to monstrous allies such as golems. If the ally can easily slaughter all opponents the players can feel outclassed. Therefore, I use powerful allies sparingly.
When using more dangerous monsters, I prefer erring on the safe side since a slightly underwhelming encounter will have less of a negative impact on my game than dead player characters.