First off, rats don't pant... if she is open mouth breathing, you're right, she doesn't have long to go... Until she dies.
Rats do not pant or such when they are going into labor, they do stretches, they lay on their back, they look bloated and miserable, etc.
if this rat is panting, it probably has a very advanced respiratory infection, and isn't very well off. I would humanely euthanize it. Rats can get edema in their chest and belly just like dogs with congestive heart failure can. It may be an older rat with alot of problems.
Sorry to be so blunt like that...