Is it okay to go a few hours without eating or drinking while pregnant? Is that hurting the baby?

No problem. That's normal to do and not a problem, in a healthy woman with a normal pregnancy. Pregnancies are not that fragile, as babies have been successfully born for 100,000 years before modern medicine.