The inch per gallon rule is bogus. I wouldn't shove a 5 inch goldfish in a 5 gallon tank.
Think of the bioload. Frogs are actually good by themselves in a 5 gallon... Should be with 1 or more frogs... And in that small of space may feel threatened and will not go up for air... And will go for your betta's fins.
The bioload, depends on the critter. Apple snail (had one) produces more waste than a mystery snail. A goldfish more than a betta.