It can work. I've kept bettas with CPDs and with Harlequin rasbora successfully. It depends on the temperament of the betta really. The reason I separated my betta is because it became impossible to navigate feeding properly. Either the betta would pig out or the other fish would eat everything before he got to it. It can be done, but it's annoying to manage. Bettas can get unhealthy over time if you're not preventing overeating and managing their diet, which is harder to do in a community tank in my experience.
Thank you. What are CPD's please?