Actually I tell a slight lie as a recoiless gun is possible if a significant amount of the propulsion gas is allowed to escape backwards (balancing the projectile). However it would not be a good thing for any friendlies behind you in a confined space like a spaceship. (see here).
On the other hand for in-ship fighting low velocity and relatively light projectiles (darts maybe rather than bullets) would be perfectly adequate for such short range fighting (not to mention significantly reducing the risk of hull punctures) and even in freefall the differences in mass between firer and projectile should then be negligible. Though you would probably still want to stick to single shots rather than a machine gun.
I had done my research before posting my comment so I knew we already had such weapons (I agree, not great for man on man confined shipboard fighting).
In fact the principle is rather simple, so if you really wanted some sort of L85A2-type weapon in the hands of people bouncing about in free-fall, why not have some sort of force cancelling mechanism built into the gun (a relatively big piston that is triggered the same time as the bullet shot in the exact opposite direction. You'll know all the forces, and the piston will be safely encased in a stock, hence not knocking out any member of your team behind you!) . Recocking the gun to the next projectile will to involve resetting the piston back of course.
Just a stab in the dark, I'm not a weapons designer nor great engineer
I would be probably go for anti-personal 'terminator' drones anyway to clean out a ship of any pesky humans - heavily armoured and not too bothered by a bit of exhaust gas