Some airlines allow the use of travel CPAP systems on their flights, and some do not. Some allow travel systems to be used with external portable batteries. For example, Air Canada strictly prohibits medical devices from being plugged into their power supply on board in case of malfunction, their device will stop working. They only permit battery-operated travel units for the duration of flight.
Users should check with the airlines prior to flying. Ultimately the airlines have their own rules about medical devices on board and patients can make an informed decision regarding their CPAP therapy prior to booking with an airline.