A batted ball hits fair between home and third, bounces into the air and is caught while over foul territory in the air without ever touching foul territory and the player that caught it is in fair territory.
For MLB rules (which I'm assuming are used unless otherwise stated), and the ball has not yet passed third base, the the only thing that matters is where the ball is first touched.
In the stated scenario, the ball is first touched (caught) in foul territory. The fact the defense is standing in fair territory, or that the ball last bounced in fair territory do not matter.
From MLB Rules 2019
A FOUL BALL is a batted ball that settles on foul territory between home and first base, or between home and third base, or that bounds past first or third base on or over foul territory, or that first falls on foul territory beyond first or third base, or that, while on or over foul territory, touches the person of an umpire or player, or any object foreign to the natural ground.
Having touched the player while over foul territory, this is a foul ball.
NCAA Softball rules reuse this statement as rule 22.214.171.124
A foul ball is a legally batted ball that ...
126.96.36.199 Settles untouched on, or first touches/is touched by (1) a fielder or umpire, (2) either of their attached equipment or clothing, (3) accidentally by a base runner or her equipment/clothing, or (4) any object foreign to the natural playing surface on or over foul territory between home plate and first base or home plate and third base, even if the batted ball first rolled against the discarded bat (see Rule 11.12.1) or hit the ground in fair territory including the pitcher’s plate and home plate.