Two-Weapon Fighting states:
"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
It never actually says that the attack with the light melee weapon has to be part of the attack action, just that you must "take the attack action" and "attack with a light melee weapon..."
There have already been some questions regarding when you have to actually be wielding the light weapons required for Two-Weapon Fighting. Here, Here, and Here.
And to satisfies any of those, say the following scenario occurs:
It is Alice's turn, and she starts her turn wielding two light melee weapons, say, two daggers.
She makes an opportunity attack against a creature using one of these weapons (this is possible, for example, if a creature had used the ready action to move).
She drops one of her daggers (a free action), then takes the attack action and as part of the attack she draws a non-light weapon, say, a quarterstaff, and finally she attacks using this quarterstaff.
And so now I wonder, is there any reason, RAW, that she would not be able to use her bonus action to attack with the other dagger which she is still holding because she has technically fulfilled both requirements of Two-Weapon Fighting: "taking the attack action" and "attacking with a light melee weapon..."?