It's totally possible (sort of)!
Such stars are called - not surprisingly - intergalactic stars. These stars are often referred to as hypervelocity stars, because in order to reach galactic escape velocity, they have to be traveling really quickly.
The current theory is that a pair of binary stars encounters the supermassive black hole at the center of their galaxy. One star goes towards the central black hole, while the other is flung out of the galaxy at an enormous speed.
Image in the public domain.
This graphic details a three-star system encountering the supermassive black hole, but the same setup works just as well with only two stars. Only one will be ejected, not two.
That said, galaxies would still most likely be visible from a planet orbiting the star. Many galaxies can be seen with the naked eye, and this would still be the case for planets outside the galaxy. So it's likely that inhabitants of this planet (if there are any) would still see plenty of galaxies. They'd just be very, very faint, for the most part.
Additionally, we have to deal with the issue of the orbital stability of the material orbiting the planet. Any encounter strong enough to fling the star out of the galaxy might dislodge the debris from its orbit around the star, sending it somewhere completely different. I would think it unlikely for the star to pick up a substantial amount of planet-forming material on its way out, and certainly not outside the galaxy in the intergalactic medium, but its possible.