Tiny buildings always work like undead summons. You can't require a unit to build something like a peasant or peon through the use of that ability.
Heroes can be given the ability to construct buildings just like any other unit, though they can't "learn" new buildings through the hero ability system, AFAIK.
You CAN abuse techtree requirements, though that would be per player instead of per hero (though that might not be important for your map). If you want to do that, give the buildings to the hero like a normal worker, and add techtree requirements to the building that require dummy units. When the hero learns the (dummy) ability to build a new type of building, spawn the dummy unit through triggers in some unnoticeable corner of the map.