How to convert a pressure height (ADS-B) to a geometric height?
ADS-B gives both pressure altitude and geometric altitude.

In the position messages you will find the pressure  altitude which is essentially a pressure converted to an altitude. For this conversion the ICAO Standard Atmosphere is used.

In the velocity message you will find the difference between the geometric altitude and the pressure altitude. Since the difference between them is fairly limited a few bits could be saved by encoding the difference instead of the geometric altitude.

If you don't have the geometric altitude and you want to obtain it from pressure altitude (regardless where it cones from) you will have to know the relation between pressure and geometric altitude in the atmosphere.

You can model it according to the hydrostatic equations of the ICAO Standard Atmosphere and correct for actual temperature, lapse rate and local pressure. This gives fairly good results.

For higher altitudes data from meteorological models can be of help to improve accuracy.