Hello, Nadine.
It is my understanding that it is still a matter of controversey whether lungs developed from swim bladders, or the other way around. In fact, I am under the impression (perhaps incorrect) that the lungs-first scenario is more widely accepted; I will accept correction on this.
Just as your scenario does make sense and is plausible, so is the other. Fish living in stagnant water would supplement their oxygen intake by gulping air at the surface; those with more blood vessels near the surface of their throats would be able to absorb slightly more oxygen from the air as it moved toward the lungs; even more oxygen would be absorbed if this region of the throat were to become "bowl-shaped" (more surface area); then further division into chambers, leading to air-sacs, would not only increase the surface area, but it would also separate (and protect) the lungs from the throat, allowing for thinner walls in the air sacs.
Then when a population of this ancestral teleost moved back into open water, acquiring oxygen from the air would be less important, but buoyancy in the larger volume of water would be very useful, and so the lungs would adapt to becoming strictly a buoyancy device.
Now, I don't know which scenario (if either) is correct; for some reason, though, I am partial to the lungs-first scenario.
"Intellectually, scientifically, even artistically, fundamentalism -- biblical literalism -- is a road to nowhere, because it insists on fidelity to revealed truths that are not true." -- Katha Pollitt