Yes it is possible to fire a gun in space as the cartridges today have their own chemical reaction that doesn't require oxygen to fire them. We all know space doesn't have oxygen so that wouldn't be an issue.
You won't hear the gunshot because of the vacuum so you would have no idea if it had even been fired really.