You can get a HDMI audio extractor and put it between the AppleTV and your TV, then run optical audio (5.1) from the extractor to your receiver's optical audio input.
This way you switch the receiver between inputs to get either Bluetooth sound or digital optical sound (AppleTV) as you would like. I'm assuming you want to play movies/etc. through the AppleTV.
Obviously, you could also just get a second streaming device like a Roku and run that through your receiver as well.
Your receiver:
https://www.cnet.com/reviews/harman-kardon-avr-247-review/
It only has a couple of HDMI inputs, but it is fine for 1080p video I expect to any television without doing upgrades.
Here is an example HDMI audio extractor:
Amazon.com: AmazonBasics 4K HDMI to HDMI and Audio (RCA Stereo or Spdif) Extractor Converter (Supports Apple TV, Fire TV and Blue-Ray Players): Electronics
www.amazon.com
There are at on of them on Amazon, most reviews are decent. Quality can vary just a bit, but mostly it is just them failing completely due to bad power supplies and the like. For the most part, they work just fine. Oh, and the one linked has both Toslink (optical) as well as S/PDIF (coaxial) digital audio outputs, which will play nicely with your receiver.