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 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 fails 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 ("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, 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, a bishop, it uses the specific term episcopus.
Here’s where Latin has an edge over English in terms of precision, for 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 long-standing 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 "priest" (a bishop being a priest but more than a priest).
Now you can now answer your own question and your friend’s argument: The Latin text of canon 1003, which you correctly cited as controlling current Church practice in administering the sacrament of anointing, uses not the term presbyter, which would have advanced your friend’s argument by excluding bishops, but instead uses the term sacerdos, which, we see now, refers to priests or bishops. Thus, according to canon law, priests or bishops, but not deacons, can administer the sacrament of anointing of the sick.