Botia modesta does get to 12" Look at the pics:
http
/www.loaches.com/species_pages/botia_modesta.html Is that your fish?
It is no surprise you are having aggression issues. The inch per gallon
guideline only applies to tiny fish such as neon tetras and does not take into acount aggression, territoriality, schooling behaviour, breeding behaviour, physical space, activity levels or pretty much any other parameter besides size. It doesn't even consider that a neon tetra is not only shorter than a keyhole, it's also skinnier.
Keyhole cichlids don't change sex. You are under this impression simply because you had immature fish and had not sexed them accurately. When they breed, they become territorial - all be it less than most other cichlids - and they should never be kept in something as small as a 10 gallon. In fact, very few fish that grow over 3" are suitable for a 10 gallon. The keyholes need to be in a minnimum of 20 gallons.
Botia modesta (your loach) is also a fin nipper and a rather aggressive species. They are not suited to small tanks - not only because of size, but also because of behaviour - and you should move that fish out or return it to your LFS right away. Considering their size, they need a somewhat larger tank than you have at the moment.
edit: I think The Wolf and OohFeeshy have this covered
