Can CloudFlare use different origins based on path pattern?
This is something that they recently started offering as an enterprise feature see: https://support.cloudflare.com/hc/en-us/articles/206190798-Using-Resolve-Override-in-Page-Rules
You could use cloudflare workers: https://developers.cloudflare.com/workers/recipes/conditional-routing/
For your use case you could use the provided example, but change the logic to inspect the url path instead of an http header.