Yes you can. Check this:
...
How do I turn off iCloud Photos on only one device?
You can turn off iCloud Photos on a single device when you follow these steps:
- On your iPhone, iPad, or iPod touch, go to Settings > [your name] > iCloud > Photos, then turn off iCloud Photos.*
- On your Mac, go to System Preferences > iCloud. Next to Photos, click Options, then deselect iCloud Photos.*
- On your Apple TV 4K or Apple TV HD, go to Settings > Accounts > iCloud. Under Photos, press Select to turn off iCloud Photos.*
If you have Optimize Storage turned on, you might not have all of your original photos and videos on your device. To download the original photos and videos on your iOS device, go to Settings > [your name] > iCloud > Photos and select Download and Keep Originals. On your Mac, open Photos, choose Photos > Preferences, then select Download Originals to this Mac. Then you can turn off iCloud Photos. You can also select the photos and videos that you want to download from iCloud.com.
Before you turn off iCloud Photos, you might want to make a copy of your photos and videos.
...
copied from: Get help with iCloud Photos - Apple Support