There may be various answers. Here one viewpoint is given.
(i) I would raise an alarm so that the thief is caught and handed over to the police.
(ii) I would hand it over at the nearest police station.
(iii) I would warn her not to do it, otherwise I would have to inform the concerned authorities.
(iv) I would advise my friend and make her/him conscious about the mistake she/he is making.
(v) I shall scold the classmate and tell her/him to return the pen to its owner.