Don't research the tech that obsoletes that unit or don't hook up the resource required to build that units replacement, if a resource is required. For example, you like your cheap Ansars, but want to build armies: Research Military Tradition, but don't hook Saltpeter up. Or you are Egypt, building cheap War Chariots: either don't research Chivalry or unhook your Iron and you can still build them.
Really? Guerillas are not exactly what I expected that you wanted to keep building. Then you would go into Conquests editor and change it so it can't be upgraded. Beware, changes there can be tempting, you can do alot to units. To use those changes, you'll need to start new games from that .biq. This could better be explained by the folks in the Creation & Customization forum.
i want to keep building guerrillas, i was looking more for a solution along the lines of changing the rules.