It is barely even ambiguous. Bean absolutely knew, and showed it; Ender probably also knew, but intentionally hid the fact that he knew from the adults. The whole battle school was filled to the brim with brilliant, command-trained, engineered psychopaths, as a design feature of the program. They needed someone just empathy-deficient enough to sacrifice most of the human combatants, if it meant annihilating the enemy.
Ender may have suspected that the command would turn on him once the war was won, as they turned on Rackham, so established a public facade of a personality that would struggle morally with winning a total war by any means necessary. He had to be a good guy, rather than a captive, monster-fighting monster, and then keep up the act until he could escape the ensuing post-victory political meltdown on Earth.
I'm not sure if Card even knew at the time he was writing it, or if he left that intentionally ambiguous, to be filled in later if necessary. But as I read it, Ender knew, and was already playing at least one move ahead, past the victory against the aliens.