It is stalled when stepping on the gas will no longer increase RPMs. Stalled means no longer producing internal combustion.
But that's not consistent. One can satisfy the first part, and not the second, vice versa. First part first:
It is stalled when stepping on the gas will no longer increase RPMs.
According to this, a (modern) car coasting in gear is not stalled.
What happens when you step on the pedal is entirely up to the ECU. As far as it's concerned, when you're not stepping on the gas pedal
something has to turn the engine at an RPM equal to or greater than X (I haven't played around with it enough to figure out what the number really is, but I'd bet it's around 1000). Whether the engine is spun by the power it's creating or by backload transferred through the drivetrain from the momentum of the vehicle, the ECU doesn't really care. If it has to provide fuel to the engine to maintain the RPM at the threshold, it will, but if the RPM is 2000 because the engine is coupled to the wheels and the car is coasting, there's no reason to provide fuel at all, and so it does not. The engine isn't creating any power, but it is rotating and it is getting air and a spark*, just no fuel.
Now, if you step on the pedal, the ECU decides you want more power, so it alters the throttle position if necessary and commands the injectors to open as required. Instant power. Because the only thing missing was fuel, the 'non-running' (freewheeling, or windmilling, depending on terminology) engine is immediately developing power again because it was only missing 1 component of the internal combustion cycle.
So coasting uses no fuel, but the engine is maintained in a state where stepping on the gas will immediately yield power, since only fuel was removed in the first place.
Stalled means no longer producing internal combustion.
By this definition, a car coasting in gear
is stalled, because there's no combustion happening. There's no need for it. The engine will happily spin due to the rotational energy provided by the transmission, until the car slows too much, and then it's not coasting anymore and the ECU steps in with fuel to keep things running.