Is there a non-idiomatic word or phrase meaning the same as "on the fly"
Solution 1:
extemporaneous - Spoken or done without preparation
That's more for the actions a quick/sharp-witted person might carry out.
Solution 2:
You could say that they are good at improvising.
Improvisation is the practice of [...] talking, problem solving, or reacting in the moment and in response to the stimulus of one's immediate environment and inner feelings.
Generally it would be clear from context that the more artistic connotations don't apply.
You could probably also work with the word spontaneous, but I prefer improvising to either that or extemporizing.
Solution 3:
impromptu - unprepared, extempore
Solution 4:
You can say someone is "quick-witted" or that they are "quick to adapt to change" and have the ability to "learn new things quickly"