I would like to give a user permission to upload files to my GCP bucket, but only if the file contains a certain prefix.
Is this possible or do I have to create a separate bucket?
Yes, this is possible you can check the file prefix before uploading it to the GCP bucket. But in GCP there have no option to give permission for files prefix.
Also, To learn about other ways to control access to buckets and objects, read Overview of Access Control.