The rust doesn't seem to be that bad in the pics - most of it looks like heavy surface rust. Once you see metal perforation, where the rust has punched all the way through - then that could be grounds for a problem. If you are concerned about the corrosion - there are places that will clean the bottom of the car and seal it with a new generation of body sealer / undercoating. Not like the previous types with can actually inhibit the original rust preventative coating on the metal parts. They are pricey though, and not all shops have the equipment or proper training to do the job. Others have gone the DIY route with underbody washing / degreasing and then spot treating with a rust preventative like POR-15 or similar.
The 7th gen Corolla is arguably one of the tougher cars out there - durability, reliability, low cost of maintenance, low cost of operation. I'd stay with this one for some time. Car is still plenty safe - coupled with a relatively low curb weight, FWD layout, a chassis that is very forgiving - hard to find an easier to drive car.
The 8th generation is very similar to size and driving characteristics to the 7th gen - if you decide on getting a newer one, I'd go with a 2001-2002 model years, since they tend to work most of the issues out closer to the end of the generation.
Of the 9th gen Corollas (2003-2008), I'd stay with the 2003-2004 model years for similar driving experience. The 2005+ models switched to the DBW (Drive-By-Wire) throttle body system that can take some getting used to.
Starting in the 2009+ model years, they added the EPS (Electric Power Steering) system which can take even more getting used to by some.