There's no electrical reason why most any extension cord would not work fine with a CPAP machine. They don't use a great deal of power, relatively speaking. I would guess that the warning is more to avoid liability if someone should for instance pinch an extension cord between the bed and the mattress or something like that.
The direct DC connection would be preferable if you're dry camping as it avoids conversion losses in an inverter and in the power brick for the CPAP. If you have shore power, it doesn't make much difference one way or the other.