Both species are shoaling fish, meaning they naturally live in large groups and should therefore be kept in groups in the aquarium. The barbs may well attempt "schooling" with the rainbows out of frustration at not having sufficient of their own.
Shoaling fish are that way for specific reasons. The obvious are protection--safer in numbers--and finding food--more chance of prey in numbers. But within the group the fish may have a social structure or interrelationships that can involve many aspects such as aggression, display, spawning preparation, dominance, etc. Denied this necessity to the fish, leads to stress and health problems and/or increased aggression. Which brings me to the next point.
These two species are not compatible. The threadfin rainbow, Iriatherina werneri, is a small fish, attaining 1.5 to 2 inches max, and very quiet and peaceful. The Roseline or Denison's Barb, Puntius denisonii, attains 6 inches and will eat any fish that fits into its mouth. Things may be peaceful now if the Barbs are small, but they will not stay that way.
Both species are included in our profiles section. You can click on the shaded names (common or scientific) above to see that profile. The grouping issue is referenced in both, along with minimum numbers (8 for the barb) and minimum tank sizes. The barbs need space, they are active swimmers.