This article got me thinking, can a planet hold a moon in orbit if it is just floating in the galaxy by itself not as part of a star system? Can a celestial body even qualify as a planet if it is floating around by itself?
The answer is Yes.. Planets that don't orbit around a star are known as Rogue Planets. There is nothing preventing a rogue planet from having one or many moons.
Not so long ago, the first candidate for a free-floating exoplanet-exomoon system was presented in this paper. It looks like a gas giant several times larger than Jupiter with a sub-Earth mass moon.
Another study calculated and simulated scenarios where planets where ejected from their orbits around a star and concluded that around five percent of Earth-sized planets who are accompanied by Moon-sized natural satellites would retain them after the event.