Yes, you can move your Photos library to an external drive, make that library your System Photo Library, then connect it to iCloud Photos. I've done that in the past on my iMac, and I'm now in the process of moving it to a large, faster (SSD) drive.
Yes, Time Machine will still be able to back up your library on the external drive to another eternal drive, provided the Time Machine drive has enough space for the backups. (One rule of thumb is that the T M target drive should be three times as large as the source drive (or the sum of several sources).)
However, you shouldn't think of iCloud Photos as a backup. It is primarily a vehicle for distributing photos, videos. and changes to them among several devices. (A secondary capability is reducing the storage use on some of those devices, with the tradeoff of speed and the need to be net-connected when editing or enlarging photos or playing videos.) Because iCloud Photos distributes changes, an edit or deletion on one device propagates to the cloud version and to other devices; as a result, you cannot just restore from the cloud to correct user error. It does work OK if the problem is loss of the local device.