It is extremely important to stay hydrated but generally water is not required. Drinking water during a yoga practice can break your concentration. Why not drink a couple of glasses of water before the class to stay hydrated. Re-hydrate after the class.
It’s generally recommended to avoid heavy meals immediately before a yoga class; if you’re hungry, opt for a light snack like fruit or nuts about an hour before to provide energy without feeling weighed down.