彼はおかしを欲しがっています。= He wishes for candies.
彼はおかしが欲しいといいました。= He said that he wanted candies.
I don't know in what context your teacher told you what you mentioned here. But, there is no insinuation of a child throwing a tantrum on the first sentence. However, I would probably say 「彼はお菓子が欲しいようです。」meaning, "he seems to want some candies."