There is potential energy between something like a vacuum in a container and a gas on the outside of it, or vice-versa. Could this energy be harvested in a vacuum, or close to vacuum situation like on mars, if you had access to a gas?
No. In an ambient of 14.7 psi, it requires work to produce a vacuum, and an engine that runs on vacuum would produce no net work.
Easy way would be to drive a turbine, but it would consume the gas. would be easier to transport the energy in a battery rather than a heavy gas cylinder. The gas escaping may be able provide extra energy by being burnt , but may need oxygen also.