Yes, you can cast three cantrips in one turn
In general, the limit on the number of spells you can cast comes from the actions you have available. This is also explained in the Sage Advice Compendium:
Is there a limit on the number of spells you can cast
on your turn? There’s no rule that says you can cast
only X number of spells on your turn, but there are some
practical limits. The main limiting factor is your action.
Outside of that, the only rule that limits how many spells you can cast in a turn is a rule for casting spells with bonus actions (page 202 PHB):
A spell cast with a bonus action is especially swift. You must use a bonus action on your turn to cast the spell, provided that you haven’t already taken a bonus action this turn. You can’t cast another spell during the same turn, except for a cantrip with a casting time of 1 action.
and this has been clarified by Xanathar's Guide to Everything, under Ten Rules to Remember (page 5):
If you want to cast a spell that has a casting time of 1 bonus action, remember that you can't cast any other spells before or after it on the same turn, except for cantrips with a casting time of 1 action.
So, if you cast any spell - including a cantrip - using your bonus action (for example from the Quickened Spell feature), you can cast any number of additional cantrips with casting time of 1 action that your available actions allow.
War Caster says:
When a hostile creature's movement provokes an opportunity attack from you, you can use your reaction to cast a spell at the creature, rather than making an opportunity attack. The spell must have a casting time of 1 action and must target only that creature
So the kind of cantrips you can cast with War Caster as an opportunity attack fulfill the requirement of having a casting time of 1 action, and you can cast them in the same turn by using your reaction. The bonus action requires that the spell has a casting time of 1 action, not that you use your action to cast it, and War Caster does not change the casting time of the spell, it changes the action you use to cast it. This also is supported by the SAC which states (emphasis mine):
Each spell has a casting time. A game feature, such as
an opportunity attack, doesn’t let you bypass that casting
time, unless the feature says otherwise. The War Caster
feat is an example of a feature that does let you bypass a
1-action casting time to cast a spell in place of making an
The feature is not changing the casting time of the spell, it is bypassing it.
If you want to cast a cantrip with a reaction via War Caster from an opportunity attack, that would not normally be on your turn, it would be on whatever opponent's turn it is. It could however be in the same round. It is unlikely an opponent would be subject to an opportunity attack on your own turn, because the rules for it state:
You can make an opportunity attack when a hostile creature that you can see moves out of your reach. (...) You also don't provoke an opportunity attack when you teleport or when someone or something moves you without using your movement, action, or reaction.
So even if one of your allies pushed them out of your reach, this would not trigger an opportunity attack on your turn.
It could happen, if the opponent had a Readied Action to move out of your reach that is triggered on your turn (thanks to Matthieu for pointing this out). In this situation you can cast 3 cantrips during your turn: one with the bonus action, one with your normal action, and one with your reaction. If you had the Action Surge feature (from taking 2 levels in Fighter), you even could cast a fourth cantrip in the same turn.