Medicare eligibility is not dependent on any sort of means testing. The richest citizens of the United States are as entitled to participate in the program just like everyone else. Medicare eligibility is age based only. If you are 65 years old, you can receive Medicare benefits.
Part of your payroll tax deductions went to Social Security and part went to Medicare. You have already paid for the right to take part in Medicare Part A (hospitalization). Therefore, an inheritance has no effect on Medicare eligibility for using Part A benefits. In fact, to not take part in Medicare Part A you must to sign a waiver of all your that eliminates all of your Social Security benefits.
Depending on the size of your inheritance your Part B premium could increase under the Income Related Monthly Adjustment Amount (IRMAA). This could occur only if the income you received from your inheritance is earning income that puts you above the threshold of $85,000 per year for a single person or $170,000 for a married couple. The Social Security Administration will calculate what your monthly Part B premium will be. However, even if your premium goes up your Medicare eligibility remains the same. However, unlike Part A Medicare, Part B is voluntary and you can opt out of it and not pay a monthly premium.
Everyone with Medicare is eligible for this drug coverage, irrespective of resources and income, current prescription expenses or health status. Thus an inheritance will not alter your Medicare eligibility to take part in this program. But, like Part B Medicare, the drug coverage benefit id voluntary.