You have to either not have them as your friend, or unplug your xbox live. That’s the only way I know how.
Sounds like the bigger issue is with the “friend”.
on the friend’s side, there’s an option for them to disable all popups for friends online. this is particularly annoying when watching a movie…