Yes, though on a vehicle-scale rather than a personal-scale weapon. The "difficulty" is that there's been no real reason to arm astronauts IOTL, since, well, there aren't any situations where they might have to shoot at other astronauts/cosmonauts. At most you'll see survival weapons on Russian...