If your Time Machine drive is not partitioned, you won't be able to use for storing other files. You'd need to have 2 partitions on the disk (one for Time Machine, the other for the other files.)
This setup is not usually recommended but, if your intent is to also have a backup of your full-resolution photos, that would be reasonable.
If you intent to download those photos for purposes other than backup, using a 2nd external drive is recommended.
Now, Time Machine already backs up your photo library (even it is synchronized with iCloud.) The only limitation of the synchronization is that, if you use iCloud Photos and your internal drive is nearly full, your Mac will store low-resolution photos (not all of them, just enough to have enough storage) on your internal drive (the full-resolution photos are safely in iCloud). In which case, Time Machine would only back up those low-resolution photos.
So long story short, if your internal drive has plenty of free storage, let Time Machine take case of the backups.