Create an iCloud account on my friend's iPhone
If all you need to know is whether it will erase your friend's iPhone data, the answer is no. 

What your friend will need to do is sign out of their iCloud account via Settings > iCloud.

After signing out, what happens depends to some degree on what version of iOS your friend has installed, whether they have other Apple devices, etc. However, the worst case scenario is that when they sign back into their iCloud account all their iCloud data will sync back to their device with the exception of any photo stream photos older than 30 days. (Of course, if you're only going to use it for a very brief period to create the account, and then sign out of it, this won't be an issue as they'd be signing back in not long after signing out).

However, I do strongly recommend that your friend does a manual backup of their device to iTunes (on their computer) first. This is just an extra precaution in case something unexpected happens.

Also, your friend may get some emails from Apple (e.g. about Find My iPhone being disabled, etc).