Bayes' Theorem is just a simple identity in probability theory for two random variables that is independent of what your fundamental interpretation of statistics would be. So both a frequentist and a Bayesian would define two random variables, $X$ as the binary random variable that describes which urn is selected and another random variable $Y$ that describes the sampled marbles, and then would try to obtain $p(X|Y)$, maybe via Bayes' Theorem (if we are also given the prior $p(X)$).
The difference between frequentists and Bayesians is not that the frequentists don't use Bayes' theorem, but that (roughly) Bayesians consider parameters as random variables which frequentists do not.
But in this example, both frequentists and Bayesians would be happy to consider both $X$ and $Y$ as proper random variables.