The rules for two-weapon fighting state:
When you take the Attack action and attack with a light melee weapon that you're holding in one hand, you can use a bonus action to attack with a different light melee weapon that you're holding in the other hand.
Emphasis mine. Now, under most circumstances you would wield two light melee weapons, attack with at least one of them during your Attack action, and attack again as a bonus action. However, the rules themselves just say "take the Attack action and attack with a light melee weapon", not specifically "take the Attack action to attack with a light melee weapon" or "attack with a light melee weapon during an Attack action".
In other words, both the requirements "took the Attack action" and "made an attack with a light melee weapon held in one hand" need to be met during a turn, but the light melee weapon could be used to attack separately from the Attack action. Is that correct?
An example for how to accomplish this: An Eldritch Knight Fighter takes the booming blade cantrip and the Dual Wielder feat. That Fighter takes the Attack action, attacking with a Greatsword, then uses Action Surge to take an additional action. He drops the Greatsword (everything I've seen indicates that dropping a weapon doesn't even require an object interaction), then draws two light melee weapons as permitted by Dual Wielder. For the second action, the Fighter casts booming blade (SCAG, p. 142) which states:
As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell’s range
Thus, after those two actions the Fighter would have both taken the Attack action and made an attack with a light melee weapon in the same turn, and I would expect he could use two-weapon fighting to make a bonus action attack with the weapon not used during booming blade.
Note that this scenario is just an example; I'm not 100% certain there's a way to cast booming blade while holding two melee weapons, but I know there are other ways to make an attack outside of the Attack action and I just couldn't find one quickly that was more definitively possible.