Yes, and I would highly recommend it. Reduce your debt before it occurs.
If you are attending a combined research and teaching school, there may be lots of jobs available which will enhance your professional learning experience rather than detract from it.
If you want a job that has minimal impact on your study time, drug studies usually pay very well, and all you do is lay around doing whatever you want, like study.