Your free object interaction can happen only during your (regular) action or your movement.
Since your free action can happen during movement or during an action, and since movement is not actually a part of the action economy, but just a thing you can do you can freely draw your weapon at any point during your turn as long as you have not already used your free interaction in the same turn.
However, the scenario you have described doesn't work. You receive the bonus action from TWF only if you are holding both weapons at the time you make the first attack. Since he has not yet drawn his second weapon and is not holding it in the other hand he does not get the bonus action.
The scenario described does work if the creature draws the second light melee weapon as his free interaction as part of the attack action made.
When you want to use TWF, you make the following checks, in this order:
- Am I making an attack?
- Am I attacking with a light melee weapon that I am holding in one hand?
- Am I holding a light melee weapon in my other (non-attacking) hand?
If you can answer yes to all three of these questions when you make your attack, then you qualify for two-weapon fighting and receive a bonus action to attack with the weapon you are holding in the hand that has not already been used to make your attack.
If you have not yet drawn your second weapon at the time you make this attack then you cannot answer "yes" to question 3, and you do not receive the bonus action.
To be clear, I am not advocating that you must draw the weapon before you declare you are using the attack action! What I am advocating is that, either before you make or as part of ("when") your attack action is when you must draw your second weapon. 5e takes a much more simulationist approach to the game and so as long as you describe your actions in a way that jibes with the rules for TWF (that is, holding a weapon in your "off-hand" when you make your attack), you can have your TWF bonus attack.