A few modellers did this back in the day when small air pumps were not available. Two stroke glow or diesel motors were often used, with the glowplug or compression screw replaced with a one way valve. That was the air outlet, the inlet was usually the port located at bottom of the cylinder. Sometimes, modellers would replace the cylinder liner, and place two valves at the top for both the inlet and outlet- this gives the best efficiency.
A more popular choice was converting tyre inflator compressors, however I've only really seen these used in fairly low pressure systems, like converted Darnell boats, and you could quite easily substitute them for a diaphragm compressor.
These days you can get really nice miniature diaphragm pumps for very little money, they're very efficient at moving air, quiet, pretty much maintenance free, and take up little space.
The only benefit of a piston based compressor is if you want to compress air at pressures above one atmosphere. Diaphragm compressors need to be connected in series to reach higher pressures, pistons do it with ease, however if you're going to run high pressures it's important that the rest of the boat is built to handle it.
A piston based compressor will be larger, thirstier and require routine maintenance (lubrication) in order to remain reliable.