Railgun, Gauss cannon, laser gun
Even if a railgun could feasibly fit into a platform the size of a rifle, it would offer almost no benefit over a rifle using self-contained cartridges. In addition to that, it would have to hold both a power source and ammunition. The railgun doesn't truly shine until you get to massive proportions, like shooting car sized projectiles at ridiculous speeds.
A gauss cannon is practically the same thing as a railgun, but it uses coils. It is probably more viable than a railgun for compact purposes because it wouldn't require you to have contacts that slide along the barrel with the projectile.
Lastly, we have developed lasers, and they work pretty well. They could even be made to fit into a compact device, but it would require a power source that would provide far less fire power than a standard 30 round magazine from a comparable rifle (if you tried to make it the same size). In addition to that, it wouldn't be a continuous stream (pulse) because the laser would overheat and the power source would run dry very quickly. If there isn't a continuous beam on the target, the most you could hope to do to an opponent is burn through their skin and muscle tissue, but ultimately, they probably wouldn't die because the penetration just wouldn't be there.
Anyways, if any of this could happen effectively, I don't see why average person couldn't have them. However, I think this is the same argument that antis are using to try and take our rights away. Something about how the founding fathers could never have imagined assault weapons and .50 cal sniper rifles and self contained cartridges.