You were told wrong. A GFCI device works by comparing the current that leaves the source on one wire with the current that returns to the source on the other wire. If they are not equal, it means that current must be taking some other path, and that path might include a person. So it will trip if it senses a leakage current, regardless of where that leakage current is flowing.
Saying it will not protect a person who is not "grounded" is very deceptive. Consider two persons, each holding a power tool that has an internal failure and that is plugged into a GFCI protected receptacle. One person is barefoot and is standing on a metal deck leaning against a metal pipe. The other person is wearing rubber boots and is standing on a rubber mat close to, but not touching, the same metal pipe. If both power tools short out, both persons might get a shock, and if they do, the GFCI devices will both trip and will protect both persons. How could the person in rubber boots get a shock, if he is "not grounded," you ask? Through capacitve coupling with the nearby metal, I answer. My point, from a safety program standpoint, is that you may think you are not grounded, but you may still be part of a fault current path.
So a better way to look at things is this way: If the non-grounded person starts receiving a shock, the GFCI will protect him. If he does not get a shock, perhaps because of the rubber boots, or perhaps because he is standing too far from the metal pipe to create a capacitive coupling, or perhaps for some other unknown reason, then there will be no need for the GFCI to act to protect him.
Bottom line: regardless of whether a person is grounded or not, if he is subjected to a shock situation, the GFCI will protect him.