Hello, the carbon dioxide formation is mostly anaerobic fermentation or enzymatic activity. Both O2 consumption and CO2 production mean that you have a consortium of aerobic and anaerobic microorganisms.
If you need to detect only the presence of aerobic forms you can measure BOD biological oxygen demand.
If you are looking for any bacteria including anaerobic the best approach is PCR using a universal bacterial primer.
Also, check COD chemical oxygen demand the consumption of oxygen can be connected with COD.