Translation:The teacher asks the boys about something.
How would you say "The teacher asks the boys something?" without the "about"? My first guess would be "La instruisto demandas ion al la knaboj." but it seems strange for "la knaboj" to go from being a direct object to being an indirect object without the role or the verb changing.
I didn't think that it was right, just that was my first swing at the sentence Miacomet asked about. I realized later that it should have been el. I might differ with you about the use of al since that usually indicates a sense of direction also. "Mi demandas ion al oni" would translate as "I ask something to someone." Whereas, with el the translation would "ask something of/from the boys."
If it is "asks the boys" then the boys most certainly take the infinitive. If it is "asks about/of the boys" then they don't.
You may correct me if I'm wrong, but I think this is where we reference La Fundamento de Esperanto, Rule #8; "All prepositions govern the nominative case."