You can have a building unlock a technology, but once it is unlocked, you can't lock it again.
There are also diplomacy buildings in the core game that allow you to build a particular unit as long as that building is linked to a city. However, the AI handles those extremely poorly when it comes to choosing units.
The third option is to make a building produce a special resource, that would be needed to train units. The resource would function like food, ie you have a continuous stream of the resource instead of piling it up like gold or metal. Alas, the AI handles that poorly too.
Thanks for the information. I'm thinking the special stuff be a resource like horses/wargs. And I'll ask ImpInc if I can use the oil and Dalekanium resources his mod had - except I'd rename the Dalekanium to something else. I'd also include a special research that would be done to build a copy of the tech forge for your civilisation, which would have to be done before the sci-fi stuff was unlocked. You'd have to find the "Tech Forge Zero" first, though, and there'd be a civ-wide bonus for having the Forge Zero in one of your cities.
If you want an idea on how use of the Tech Forge would help in-game, this ending scene from a game called Might and Magic VII (never played any of those games myself, but this is where I got the basic idea) should be a good demonstration. I would prefer to concentrate on the Tech Forge and its tech tree first. I have Notepad++ and can learn script but I couldn't make 3D models to save my life.
I'm sure I can find tutorials aplenty on this forum, I just need some open-source/free 3D models able to be used in Elemental. I can't promise that anything will come of this idea, but I would like to get it off the ground.