My compliments on trying to base your discussion on relevant documents and on keeping your discussion friendly.
You were correct saying that deacons cannot administer the sacrament of anointing of the sick and correct again in relying on the 1983 Code of Canon Law for that position, but you cited the wrong text in this particular debate. You cited an English translation of the Code, instead of citing the official Latin text. Although citing the English version of the Code is a practical necessity and in most cases causes no difficulties, in this particular discussion it tripped you up.
The English translation of this canon is not wrong (approved translations are rarely “wrong”) but in this case it does fail to convey an important nuance contained in the Latin. When canon law wants to refer to a man constituted in any grade of holy orders, whether that man is a deacon, priest, or bishop, it uses the generic Latin term clericus, or cleric. When canon law wishes to describe specifically one who is a deacon only, it uses the narrower term deaconus. Similarly, when canon law specifically identifies a priest, i.e., a man constituted in the second grade of holy orders and not purely a deacon nor also a bishop, it uses the univocal term presbyter. Finally, when canon law refers to a man enjoying the fullness of holy orders, that is, a bishop, it uses the specific term episcopus.
One place Latin has an edge over English is that when canon law wishes to refer to a man constituted in either the second or third grade of holy orders, what in English we would call a “priest” or a “bishop,” Latin use the single and unique term sacerdos. By longstanding convention (both the British and the American Code translations read this way), the Latin word sacerdos, while meaning priest or bishop, is always translated in English as simply “priest.”
Now you can now answer your own question and your friend’s argument: The Latin text of canon 1003, doesn’t use the term presbyter, which would have advanced your friend’s argument by excluding bishops. Instead it uses the term sacerdos, which means priests or bishops. Thus, according to canon law, priest or bishops–but not deacons–can validly administer the sacrament of anointing of the sick.