Most of the 'easier' steam or air engines will run quite happily on both, but when running on steam, the correct steam oil is required to be used, usually an easy to make displacement oiler in the steam line will do the trick, whereas a quick squirt of engine oil or similar into the inlet line of the pressurised air will keep things running nicely.
The main problem is that the hot steam will soon find any leaks or weak spots on the engine sealing.
There are more complex steam engines that won't run on air, such as a triple expansion engine, these feed the used steam from the high pressure cylinder to the medium pressure cylinder, then when power has been extracted there, it is then passed to the low pressure cylinder to extract the last bits of power out of the steam. These are about the most economical of steam engines to run, but are very complicated to build by the beginner.
This is a very basic explanation and there will most probably be lots of other engines that won't run on just air, requiring the expansion of steam to run.
Hope it helps
John