What can be put in small fish tanks?
Small fish. In those sizes of tanks, I wouldn’t keep any fish that grows to more than 2 inches in length. The fish in the one to one and a half-inch range, such as small tetras, are the best suited for such small tanks. Or the Least Livebearer, Heterandria formosa, if you want a fish that acts like guppies or platies but is small enough for a 2.5-gallon tank. Goldfish need at least a 30-gallon tank. You said “a bala or goldfish …” I hope you don’t mean a “bala shark.” That fish grows to be a foot long and needs to be kept in a school, so it is very unsuited to a small tank.
A betta is the only commonly available fish that can be kept in BOTH of these tanks. Even small fish like tetras need much more swimming length and room for a proper school. In addition to the betta you can also keep a snail or a few shrimp. Goldfish are completely inappropriate for small tanks–a single fancy goldfish needs a minimum of a 20 gallon tank with aeration and double filtration. Although your choices are quite slim, you can still set up a beautiful tank with bettas and small inverts.