We only have one option for a wall that the pet door would go in. After measuring we found that the door would have to go right in the middle of a stud. Is it safe to cut through the stud?
If this is a load-bearing wall you'll want to frame the pet door in, just like you would a window. This will allow you to properly carry the load down, and around the pet door.
The king studs should go all the way from the top plate, down to the bottom plate. The header will be made up of 1/2" plywood/OSB, sandwiched between two 2x4s.
If you don't want to tear out the drywall all the way to the ceiling, you could use the studs to the left and right of the stud you want to remove as king studs.
I am guessing that this is an exterior wall which means it is load bearing. You will probably have to put in a stud on each side of the dog door and carry the load of the stud you are cutting to the outer two studs... So then you will generally have to rip out a small section of drywall and do a little work - frame like installing a window. This is relatively easy to do and you will spend more time on mudding/taping the section than the install - given you don't have to notch out for plumbing/electric.