Custom branding / theme specified by URL

EDIT

On second thought: no, both Themes couldn’t use the same database. If they did, they would have to have exactly the same settings, including active Theme, activated Plugins, and settings – which includes home_url().

There may be other ways to go about it, but this isn’t one.

ORIGINAL ANSWER

If I’m following your question properly, then sure. Just have two separate WordPress installations that use the same database.

(Note: there could be unintended consequences of writing to the same DB from two different WP installs.)

tech