Peas are OK for some fish, and yes, people do feed them to bettas BUT they should not.
Bettas are purely carnivorous fish, and the digestive tract is not made to handle a big influx of roughage. A well-balanced pellet food (NLS or similar) contains all the required fiber and plant material that a betta would need. Constipation and bloat with bettas is almost always an overfeeding issue. Bettas are opportunity feeders - meaning they'll eat anything they can find, even if they aren't hungry.
Peas are bad for bettas, but not all fish. Highly-vegetarian fish like some goldfish and varieties of cichlid do well with peas.