Can you factory reset an icloud Unlocked iphone?

I recently just bought an iphone 6 from offer up and the guy showed me every thing was unlocked no icloud or anything was logged into it. It basically was facotry reset but he forgot to take the password to the phone off and i no longer has his contact information

Yes you can. Settings. General. Reset. 2nd option Erase all Content & Settings

If it's iCloud activation locked then there's nothing you can do without the password. Its whole purpose is to avoid lost and stolen phones from being reused.