It's usually easy to tell the gender of a molly unless it's really young. Us the bottom fin near the tail pointed or rounded? If it's a male it may be trying to mate with your betta or could just be territorial. I'd just keep an eye out for nipping those long fins bettas have are pretty tempting to some fish.