No, there is no such poker rule in gerneral.
Player behaviour is often covered in the so called house rules.
Some rules which are can be found in the house rules:
- railbirds (watchers) have to keep silent when a game is running
- you are only allowed to talk about a hand when you are in a hand OR
- the current hand is not allowed to discuss on the table
If you feel disturbed by a person, playing or non playing, you can adress this to the dealer. He will surely take care, since you are the customer.
In your specific case the dealer could or should have as well noticed that you felt distracted and jump in. It's his responsibility to keep to game up and running. This also includes to remind non players to keep silence around the table.
Of course there are edge cases, if someone who is in the hand is talking a lot and it disturbes you. He is allowed to talk in general...
I always read house rules and see the tiny differencens since I use to deal as well and like to keep myself informed