You can disable the remote IR receiver on the MacBook using the Security System Preferences. This is the best solution if you have only one Apple remote. If you have two Apple remotes you can "pair" one remote to each device. When the two remotes are paired, they will only work on the one device they're paired with.
Thank you for this answer. This has been driving me nuts for months.
However, I did pair my Apple remote to my Apple TV but it still works on my Mac MINI even though it has it's own remote that is paired to it.
The Apple TV will not respond to the remote that is paired with the Mac but the Mac responds to both remotes no matter what I do. I have paired and unpaired the remotes to each device but the Mac always responds to both no matter which, paired or unpaired it does not matter.