You can, but it really is not advised. A hydraulic cylinder with air won't work nearly as well as a pneumatic cylinder for a number of reasons. First of all, hydraulic cylinders are closed systems and have seals designed for high pressure and as close to zero leakage as possible. Therefore, the seals will undergo extra friction which may even lead to a far shorter lifespan. Because you cannot lubricate the hydraulic cylinders properly, the cylinder is extremely likely to jam and the sealing will become damaged.