An acrylic primer/undercoat should do the trick. You may find the stain still bleeds through but the acrylic will hold it so it doesn’t work through to subsequent coats.
Try a test area first with one coat of acrylic and one coat of your intended finish just to be sure. If you still get the stain coming through you’ll have to use a spirit based primer to block it. It’s very unlikely you’ll need to do this though.