Medicare doesn’t require a primary care physician and there are no referrals required to see a specialist (however the specialist may require one). As long as the provider is contracted with Medicare (most are, as well as most all hospitals), you can go to any provider that takes Medicare.
On the other hand, most Medicare Advantage Plans do require a primary care physician and most require a referral to see a Specialist.