As long as it's completely dry, you can use a spar urethane over water based stains. Spar will seal and adhere to the fibers of the wood and into the pores. Since water base or oil based stains do not seal the wood completely, the spar will be fine.
Spar over paint is a completely different thing though. Spar will yellow over time and will leave streaks where it's thicker and thinner... Will look horrible. May peel because the paint seals and has a smooth finish, will not blend in over paint if you have a repair to do later on.