Yes, pea puffers can live with bettas. Bettas and pea puffers are similarly sized, so they can defend themselves against each other. However, you cannot keep just any betta with pea puffers. Pea puffers can only live together with female bettas.
Don’t house male bettas with pea puffers, because both are highly territorial and aggressive. They will likely start fighting once they spot one another.
Female bettas are known to be more peaceful. Female bettas are able to live in a group. They’re also less likely to start territorial disputes with their tank mates, so if you wish to keep bettas with your pea puffers, make sure to only choose female bettas.