You are correct, the atmosphere cannot ever be barotropic. It is important to note that the ideal gas law is relevant only as a state equation; it does not describe the gas as a whole. The barotropic assumption effectively states $P=\rho RT_0$. Effectively, it says "hold temperature constant" You may note this is particularly important when discussing the hydrostatic and hypsometric/barometric equations.
On that note, the atmosphere is never entirely barotropic; the atmosphere cannot undergo entirely adiabatic motions; the wind can never stay geostrophic, etc. There are assumptions that are bad, and we know they are (take a class in micrometeorology dealing with similarity theory). But in the words of George Box, "All models are wrong, but some are useful." These simple models teach us about basic atmospheric behavior.
It is also worth noting that the ideal gas law is not the only equation of state. The Boussinesq and anelastic approximations can lead to interesting other formulations of the equation of state.