Oh that’s a tough one.
Firstly, I would suggest you don’t take his word as gospel with regards to owning up. If he’s sneaky enough to try and cheat, he’s probably sneaky enough to drop you in it.
Secondly, you could be held partially to blame for not protecting your work better. Specifically, how did he get access to it? Did you share it, send it or show it to him? If so, you could be held accountable for being irresponsible.
I know this isn’t a positive answer, but I think you need to be prepared. I would suggest you email your personal tutor ASAP and go and talk to them. Don’t be afraid to put the blame in your “friend”’s court. He has put your degree in jeopardy. I would also advise you to be honest. If you did show him, tell them you were naive and stupid to have done it. If I were a tutor, I’d be more sympathetic and willing to support you if you were completely honest with me.
Good luck!