No, don't try this. Your friend is dumb too by the way.

Cannabis needs to be cooked into something high in fat in order to get you high (eating it).

Burning a nug inside a piece of tinfoil then eating it is just, well, dumb. That will just burn away, so tell your friend to cram it and be quiet.