Maybe you were asking about medicaid, not medicare. Medicaid is for poor people, medicare is for old people.
In general Medicare are not dependent on income or saving. However, having extra savings would affect medicaid, including inheritance.
However, one time inheritance are not counted as income, so there is no impact for one's section 8 housing benefit.