You should be able to get it if you talk to wonka to ask about the machine, but *don't* start the tour.
From the looks of the file, no; you can't get the gum without asking for a demonstration, and doing that cuts off the menu where you can ask Wonka to move to the next room. Apparently there was a "no takers" outcome at one point, but even if it was implemented, you could only reach it if Hannah already got a bad end.
As it stands, even if you could grab the gum without any blueberries leaving the room, it still wouldn't be with a full party.