Engineering and biological constraints may make the following idea infeasible, but theoretically, one way to keep people with lung damage alive is to pump their blood through a machine that oxygenates it. Dialysis is an analogous treatment for kidney failure.
Blood would be taken out via a cannula, pumped through a system with a large surface area covered with an oxygen-permeable membrane. On the other side of the membrane is gaseous oxygen. After passing through, blood is pumped back into the body via another cannula.
The large surface area could be just two flat plates with a narrow gap between them. The oxygen-permeable plate probably needs to be thin, which makes it weak. Positioning the plates horizontally allows the pressure of the blood between the plates to support the top plate. The pressure of the oxygen above it could be regulated so the plate does not bulge outward. With careful pressure management, the plate does not have to be rigid, could be just a thin film.
The potential complications are in the details: ideally the blood would be taken from the arteries leading from the heart to the lungs and inserted into the veins going from the lungs to the heart, but puncturing these vessels is dangerous. Taking the blood from an arm or leg vein is straightforward, but there may be biological problems if oxygenated blood is pumped back into a vein instead of an artery.
Sudden lung failure does not leave enough time for such a system to be set up, because death occurs quickly without oxygen. However, if the lung failure is predicted with high probability in advance (such as when a disease is disabling the lungs), then the person can be connected to the oxygenation system and kept alive. This buys time for either the disease to be cured, in which case the lungs may become functional again, or for lung transplantation if feasible.