If you have a look at the official TDA rules, Rule #53 reads: "Anytime before the end of the final betting round, folding in turn if there’s no bet to you (ex: facing a check or first to act post-flop) or folding out of turn are binding folds subject to penalty." By the player folding their all-in hand, this could be construed as "chip dumping" which most poker leagues do not allow as it very easily could be seen as a form of collusion.
On the other hand, if Player B folds as a result of Player A tricking B into thinking that they have folded, then the TD could and may exercise discretion in ruling B's hand as live if they are clearly identifiable and retrievable, killing A's hand and issuing a penalty (an orbit, formal warning, etc).