Hard to say without a pic but it could be an ulcer caused by flesh eating bacteria. Ulcers occur when the fish are stressed out and kept in dirty tanks where the build up of gunk encourages disease organisms. A weakened immune system will allow the bacteria to get into the fish and start causing damage.
Rainbowfish need clean tanks and lots of vegetable matter in their diet. If they don't get veges every day and do get lots of meat foods, this can cause ulcers. You can feed them on fresh or frozen (but defrosted) peas, carrot, spinach, pumpkin, zucchini, etc. They also do well with spirulina flakes and duckweed (a small floating plant).
Try doing a 40-50% water change and complete gravel clean each day for a week. Also clean the filter if it hasn't been done in the last month. Add veges or plant matter to their diet each day. If the problem doesn't clear up in the next week or two, then isolate the fish in a separate tank and treat it with tetracycline or something similar. You will probably need a vet to prescribe and supply you with tetracycline. This drug wipes out filter bacteria so you should only use it in a quarantine tank that has a filter with Ammogon (ammonia removing granules) in it. The Ammogon will absorb any ammonia produced by the fish so you won't have to worry about ammonia poisoning.