Yes, ultrasonic flowmeters can measure both liquids and gases. However, different types of sensors and settings are used for this.
Clamp-on flowmeters for liquids are the most common.

For gas measurements, additional requirements apply regarding pressure, temperature, and pipe materials.

See our product pages for the correct version for each application.