That could cause you problems because you need a doctor to admit you to the hospital. Then your doctor gives an order, but if he doesn't accept Medicare as payment, then Medicare might not recognize his orders. Such as --reserving an operation room, the cost of surgery, prescribing medication, an IV, ordering physical therapy and the list goes on and on.
To be on the safe side, contact the hospital billing department. It is their job to inform the patient and the doctor --before a non-emergency admission-- regarding what is covered under a patients health care policy.
You can ask your doctor to refer you to another doctor who accepts Medicare. A good general healthcare doctor will always provide a referral.