This is a very common question in the yoga world. And, there are many different answers.
If you’re in a vinyasa and you really want that sip of water, go for it. Obviously, you don’t want to drink gallons of it during class, or use it as a distracting element to keep you from doing your least favorite poses, but the body needs what it needs.
If you’re going to bring a water bottle into class, make sure that it does not only not divert your attention from your practice, but that you’re also being mindful of the yogis around you. Many teachers discourage drinking water mainly because of the noises that can come with it.
Yet, yoga should not be a “workout” in which you need a break for water every ten minutes. Keep hydrated before class and drink as much as you’d like to after (preferably 20 minutes after class).
There are indeed many teachers that highly discourage drinking water in class. It is believed that taking that sip of cold water can cool your inner heat that will eventually detoxify your body and clear your energy. Disrupting this prana flow could have a huge effect on your yoga practice (you might even notice your energy completely change the moment you get out of your pose to take that sip).