Is holding the opponent's captured pieces legal or allowed? There was a controversial finish in a Canadian championship, where an opponent [un]knowingly held the queen of the other player. The [victimised] player wanted to promote his pawn to queen, but couldn't find it. Due to time pressure, he used an upside down rook instead of a queen.
The arbiter didn't allow this and the player ended up losing the game. The decision was not reversed even though there was a video evidence of the event.
In many chess videos, I see that even the great world champion Magnus Carlsen holds the opponent's pieces in his hands, of course without any ill intent.
Is there any rule or guideline for this?
The first thing to note is that even if the opponent is deliberately hiding your captured queen (or any other piece you might want to promote to) there is no excuse for using some substitute because the rules allow for a simple solution: stop the clock, call the arbiter and ask for the piece you require. It is part of the arbiter's job to do this.
Holding a captured piece or pawn is perfectly legal as long as it does not distract or disturb the opponent. Some players like to hold a captured piece between thumb and finger and spin it.
Gelfand is famous for doing this. He always does it under the table so that the opponent doesn't see it and so cannot be disturbed by it. If your opponent does this where you can see it and the movement disturbs you then you are within your rights to call the arbiter and complain.