Well, the assignment is fraught with potential peril. Make sure your girlfriend knows about it beforehand, cuz she's sure to find out at some point. And if the friend has a boyfriend, maybe he should be invited to be there, so it's all on the up and up. (Unless she wants to surprise him with the pics.) Having someone else there is probably a good idea, to protect both of you from later accusations by anyone, but that would be up to your friend as nudity is involved. Behave like a professional and it shouldn't be a problem.
(Is my not-always-accurate memory correct on this occasion, that you're a teenager? If so, it would take a very trusting and mature girlfriend of yours to be okay with this. No matter what your age, if your girlfriend isn't okay with this, then you should decline the assignment, IMHO.)