How much mass could Earth safely lose and retain its atmosphere?

Not unless the mass loss were all in the same direction. Given that the Sun is much more massive than the Earth, what the Earth’s mass is is essentially irrelevant. If you replaced the Earth with a grain of sand, it’d orbit just the same as it does now.

Another way to get at this is: if we sent the entire crust layer of the Earth into space, would that lose enough mass? If not, we’re pretty much safe forever, I’d say. We don’t make use of anything beneath the crust, and if we sent all of it into space life here would be unpleasant anyway, atmosphere or no. (The large sub-mantle living spaces seen in the documentary The Core notwithstanding).

Given how little of the Earth’s mass is crust, I don’t expect this is an issue.

This flowchart implies that the criterion for a long-lived atmosphere is that the average thermal velocity (more accurately, its vertical component) has to be less than about one-fifth the escape velocity.