Is there a way to have a site use a theme that is specified by the URL?
for example the same site content, database and WordPress install where:
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.
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.)
I don't see why you couldn't do that. There are a few steps you'd need to go through, though.
As Chip pointed out, there are a lot of moving parts in themes (options, active widgets, etc), so I couldn't see this working smoothly if the themes in question were too very different (ie. differently named sidebars, different menu locations, or worse, different registered post types). But it could work very well if the main difference is just a stylesheet file, or maybe a few template files. Maybe you could make the themes you're going to be switching between as child themes of a common parent, and only change the style.css files and whatever assets absolutely have to be different between them.