I have one dog and one cat. The dog is a three-year old dalmatian (read: lots o' energy). The cat is an eight-year old cocktail weenie with toothpicks for legs. I have moved seven times in the last eight years (hopefully this one will be our last for the next four years). Each time the cat has moved with us. The past three moves the dog has moved with us. During the time with the dog, we have lived in a one bedroom apartment, a house, and are now moving into a one-bedroom condo.
If you feel really strongly about having your companion, then you just have to make decisions that support having one. What do I mean? When we looked at buying a house, we looked for a nearby park that Sophie (the dal) could run in. We looked for places we could take her to make sure she gets enough exercise. When we looked at buying our condo we looked for the same thing. We found a place that has an awesome walking trail practically right out our front door. It definitely takes a lot of work. I walk the dog early in the morning and when my hubby comes home he runs a couple of miles with her. Then during the weekend, we take her hiking, swimming, etc. But she is well worth it. She is our mental break.
I couldn't imagine getting through school with out my faithful pup sleeping at my feet when I study (or my fat cat trying to lay on my papers) or walking with the pup as the sun comes up every morning and clearing my mind as I start my day. When I have a tough day, I get to come home to her happy, wagging self greeting me with unconditional love.
Sure it takes a little extra work, but the benefits far outweigh the hassles. And yes, going out of town is a little more difficult, but if you are able to hook up with some other students who have (or want to have) a dog, then you can share the puppy watching duties when others go out of town and they can help when you are out of town. And many locations have dog sitting/walking people that you can hire while you are gone. If it's important to you, you can make it a reality.
If you are afraid that she'll be lonely, perhaps consider getting an independent pet like a cat that doesn't take much to care for and can provide companionship while you're in class.
Good luck to you and your best friend!
Zippy