The batter is only out if he hits the ball with one foot entirely outside the batter’s box. In this instance, I am assuming the umpire does not have enough time to call “time,” but, if he did have enough time, and he saw the batter’s foot was not in the box, he should call time, and instruct the batter to get in the box.
On the play you mentioned, it would still be a strike, but a good umpire would point out to the batter that his foot was out of the batter’s box, and put him back in the box. The Batter’s Box rule only requires a batter to keep one foot in the Batter’s Box at all times. If he steps out, either intentionally, or inadvertently, the ball remains live, and the umpire calls the pitch either “ball,” or “strike.” In high school by NFHS rules, the umpire could call two strikes on such a play – one for stepping out of the box, and one for the pitch.