You asked the question twice two different ways, but know, when you use iCloud it syncs photos across all devices, if you delete a photo anywhere on any device it will delete it on ALL devices.
BUT, on your iPhone you can change a setting to "Optimize Storage" so on your phone if it needs space it will keep a lower resolution (Smaller File) and leave the original untouched on iCloud.