It depends on if your betta will accept a tank mate. Some will and some won't. One of my males managed to evict a ghost shrimp (found it white and very dry beside my tank one morning), but both males are now living with three ghost shrimp each. I have several in my sorority with 8 females without a problem, the main worry there is the girls stealing their food rather than attacking them.
Your best bet is to simply try it and see if your fish will mind or not, just make sure to have some hidey holes for the shrimp.