-
Probably depends on which airline you are flying and what ticket you have.
If you are flying Basic Economy on Spirit or United, I would expect them to be quite strict even if your CPAP machine is technically a medical device.
Personally, I would just pay to check it and avoid the hassle.
You can reach out to the specific airline to ask their policy if you really want to carry it on.