I think a crafty engineer could design a bayonet with a socket that could snap onto the front site of most rifles. It might not be the best way to hold a bayonet to a gun, but I think it would work.
And I would think it would be legal to do it, since you are not adding a banned feature to the gun. Of course, the BATF might not see it that way.