Sort of. It's not natively supported, but you can use something like s3fs-fuse to mount a S3 compatible storage (like B2) locally and use that. I personally went a different route: Set up Nextcloud, point its primary storage to B2, and then mount a Nextcloud folder (using WebDAV) to my filesystem which I configured as primary storage for Photoprism. That setup was pretty slow, but I also had Nextcloud and Photoprism running on the same VPS which additionally was underpowered for even Photoprism alone.
I am now using a separate server for Photoprism and performance is much better