So lets say a gas is doing some work against a piston and decreasing its internal energy. Does the gas also do work against gravity if it is expanding in the positive y direction? If so would it even be measurable? Thanks for the help
Yes; the work done is equal to the change in gravitational potential energy i.e. mgh, where h is the vertical movement of the centre of gravity. However this amount is negligible in just about any context, certainly less then the error in any realisable model or measurement of engine performance. And immediately after the combustion stroke there will be a lot more work done on the gas by the piston in the exhaust stroke.