Can a visitor play their Apple Music account through my Apple TV? I have an Apple TV (4th generation, with apps) hooked up to a stereo system.

My friend comes to visit, with their own Apple Music account on their iPhone/iPad. Is there some way for them to play the music from their account through my stereo?


Can their iPhone/iPad pass the music to my Apple TV, perhaps over the network?
Can we temporarily have the Apple TV login to their Apple Music account without logging out of my Apple ID?
To answer your second question, no they cannot login without you logging out.
They can, however, use AirPlay from their iOS device in Control Center (swipe up from the bottom of the screen) to send music from their device to the Apple TV.
The Apple support article talks about conference room mode but the important part to pay attention to is the discussion of AirPlay security settings.

To restrict access to your Apple TV through AirPlay, you can choose from two security settings. Go to Settings &gt; AirPlay &gt; Security and choose the setting that's right for you:
To give access only to users in the same room as your Apple TV, choose Passcode or Onscreen Code. Each time someone with an AirPlay enabled device tries to connect to your Apple TV, their device asks for the passcode shown on your TV.
To give access only to users who have your password, choose Password. Then any user who wants to use AirPlay on your Apple TV needs to ask you for your password. You might want to change your password periodically, because after someone enters it on their device, that device remembers the password forever.