That really depends on whose ambulance it is and how, exactly, it's being used. If it's specifically assigned to the military for casualty transport then it's a target. But if it's a civil service that's just the closest response after a bombing then congratulations, you've committed a war crime by attacking it.
Which is why other militaries go out of their way to make sure they aren't targeting civil health infrastructure. Versus Israel who seems to be treating it like a target list. Again.