My friend’s usage is correct according to Rule 8 for commas, as explained in https://grammarbook.com/punctuation/commas.asp:
Rule 8. Use commas to set off the name, nickname, term of endearment, or title of a person directly addressed.
Examples:
Will you, Aisha, do that assignment for me?
Yes, old friend, I will.
Good day, Captain.