Yes it is, but the Gas Act 1995 requires every consumer of gas to take their supply through a meter that has been approved for billing purposes. Consequently, while it's not an illegal act to purchase a gas meter, careful consideration should be given to the intended use of the meter.
For example, your gas meter is used to calculate the amount of gas used to enable the gas supplier to bill you. Any interference with a meter to prevent it from recording accurately or to attempt to manipulate the quantity of gas consumed in any way, are criminal offences.