how bad is this rust?

You answered my initial question whether the damage was isolated to a leaking battery. Looks repairable, maybe just with generic patch steel. Not a body expert, but I doubt you need super-critical frame measurements. I doubt the rest of the car moved like an accident might do to bend the frame. As long as the front wheels are pointed right and the rear axle is perpendicular to the long axis, the car should drive fine.

Before you buy a frame rail, you should probably tell us what year the car is, especially whether 1963-66, 1967-72, or 1973-77. The last 2 might be the same regarding the frame rail.