Just Mongo is correct. U.S. Medicare covers XPAP under Part B. You need to find a DME in your area that accepts Medicare. Just go to 3w's.medicare.gov/ in the space provided type in CPAP supplies and click the go button.
People with Medicare who’ve been diagnosed with obstructive sleep apnea.
Your costs in Original Medicare
You pay 20% of the Medicare-approved amount for rental of the machine and purchase of related supplies (like masks and tubing). The Part B deductible applies.
Medicare pays the supplier to rent the machine for the 13 months if you’ve been using it without interruption. After you’ve rented the machine for 13 months, you own it.
Medicare will only cover your durable medical equipment(DME) if your doctor or supplier is enrolled in Medicare. If a DME supplier doesn't accept assignment, Medicare doesn't limit how much the supplier can charge you. You may also have to pay the entire bill (your share and Medicare's share) at the time you get the DME.
I bet the parts are quite protected. I like you have been fixing stuff for many years and would want to give it a try. Unless you can find a donor machine with other problems you may be out of luck. And the fan is bound to be the worn item as you know.
Ck around for private sales is where I would go but I'm a rebel and may not be the pc suggestion.
Doc J (despite my nickname I am not a doctor)
Remember to donate to the board if you can, it has helped a lot of people including myself.