What power (in watts) does your CPAP need?? (Some do come in 12V models but can have a "wall wart" power supply in some cases). I would be surprised that you would need more than a small one like perhaps a Honda 1K or equivalent. Next you will have to look at what is needed to plug it into the trailer as the cord ends might be different. Trailers generally do not have the same plug arrangement as an extension cord, an adapter may be necessary.
If you intend to run it all night be aware that many campgrounds have "generator run" hours and do not permit that. In any case, the generator had better be very quiet (like a Honda) or have enough room to move it far away from your camper (and any other nearby campers). The usual 'construction' type of generators are out as they are generally too noisy for campground use.
Since your trailer is a rental, you may have to content yourself with bringing along an extra 12V battery and a small inverter (the lights will be 12V from the trailer battery anyway) to run a CPAP. You will need to know its power requirements to buy one.