Bowler bowled a bouncer ball, main umpire signals it as Wide ball. When I left the crease to have a discussion, with the ball in keeper's hand bails come off. Is this considered out or not?
Is this considered out or not?
What did the umpire say? :-)
More seriously, you need to refer to Law 23:
1. Ball is dead
(a) The ball becomes dead when
(i) it is finally settled in the hands of the wicket-keeper or of the bowler.
(b) The ball shall be considered to be dead when it is clear to the bowler’s end umpire that the fielding side and both batsmen at the wicket have ceased to regard it as in play.
2. Ball finally settled
Whether the ball is finally settled or not is a matter for the umpire alone to decide.
Practically, the question pretty much comes down to whether there was any deception on the part of the fielding side or not - if they made it clear that the play was over (for example by throwing the ball around, shining it, etc), then 23.1(b) applies, the ball is dead and the batsman cannot be dismissed. If the keeper just kept the ball and waited for you to wander out of your crease, that's fair game. As 23.2 makes clear, it's for the umpire to judge what happens here. Nothing here matters if it was a wide or not - the ball explicitly does not become dead on a call of wide; see Law 25.4:
The ball does not become dead on the call of Wide ball.
Possibly the most famous incident of this type is when Ian Bell was run out while walking off for tea in 2011. In that case, the Indian team decided to withdraw the appeal, but that doesn't really affect things.