Serve folder as a subdomain?

I am running a service under foo.example.com. That service provides another service under the path foo.example.com/app/bar. What I would like to do is be able to go to bar.example.com and have it provide the contents of foo.example.com/app/bar. More concretely, if I go to bar.example.com/baz I would like to actually be serving foo.example.com/app/bar/baz. Is this something that is actually doable with Traefik, and if so, how can I accomplish this?

In general this is possible with Traefik.

Will your target be a Docker container, of which labels can be read by provider.docker?

Will it require the correct 2nd hostname within the forwarded http request as host header or will it check just the path?

Will your target be a Docker container, of which labels can be read by provider.docker?

Yes.

Will it require the correct 2nd hostname within the forwarded http request as host header or will it check just the path?

I'm not 100% sure what you mean by this. I would still like the URL to be displayed as bar.example.com, but the path effectively be foo.example.com/app/bar.