You can use iCloud (or any other cloud service) to backup your Photos Library, but that's not what's meant by the "iCloud Photos" selection in Photos>Preferences. As the little blurb in Preferences says, iCloud Photos is a service that stores your pictures and synchronizes them across all your devices, iphones, macs, and iPads, and allows quick off-line viewing by keeping only lower resolution images on those devices if you choose.
However, if the Photos Library is in cloud storage, then Photos can not use it. The Library drive has to have a high-speed connection to the computer, not connected through a network or the internet. If you store pictures (not the Photos Library) in iCloud or on OneDrive then you can look at them with Finder or some other apps, but you can't use the Photos app with them. Photos is primarily an organization tool that also lets you see and edit pictures.