Do rats have lungs?

Yes: rats are mammals so they breathe using lungs.