I understand your logic and how it works for many, but it's completely illogical, wrong, and impossible. In fact, it's the dealer's fault, as they should be making these decisions, monitoring the cards and bets, and should have checked both hands at showdown. Player A can't fold their hand at all. They automatically go to showdown, and everyone can see their hand, no matter what they say. (And that's exactly what happens in online games.)
Of course, in a home game there are no professional dealers, and things like this happen quite often. But in these cases, a fundamental principle of the game is being violated.
Let’s look at this example more simply. It is impossible to “call” someone’s bet and then immediately “raise” it without waiting for your opponent’s action. You either call or you raise — it has to be one or the other.
In the case of an “all-in,” you either made a call or you raised, but you can no longer fold.
In this situation, it is essentially the same as a player saying in the same move: “I raise, I call, and I fold.”
In this example, it sounded like: “I’m all-in and I fold.”
How is that even possible????