yes this can be done. I do this with swords. In blender parent the gun to the bone you want. Not parent to the armature, but parent to the bone.
In blender with the armature in edit mode, select the bone you want. Then go back to object mode. Then parent the gun to the armature and select bone. You want to select keep transform or such as it don't import well into godot.
I find it best to make a bone just for the gun in the armature. By dong this you can move it around without it deforming anything. You then can have bones for the gun on the side or back of the model.