The Torah formulates the Misva of Birkat Hamazon, "When you eat, and are satiated, bless the Lord…" Therefore, Birkat Hamazon is only a D’oraita (a Torah) obligation when one eats enough to be fully satiated. However, if one ate only a Kezayit of bread and was not satiated, the obligation is only D’rabanan (Rabbinic.)
These distinctions are important for determining the Halacha in the event a person is uncertain whether he recited Birkat Hamazon. The general principle is "Safek D’oraita-L’humra; Safek D’rabanan-L’kula"-When there is a doubt whether one fulfilled a Torah obligation, he must be strict and do it again, whereas when the doubt is regarding a Rabbinic obligation, one is lenient and does not repeat the Misva. Therefore, if a person was satiated after eating bread, and is uncertain whether he recited Birkat Hamazon, he must recite it again. However, if he was not satiated and has a doubt, he does not repeat Birkat Hamazon, since the original obligation was only Rabbinic. Even in cases where Birkat Hamazon is recited from doubt, only the first three Berachot are recited. The fourth Beracha is always a Rabbinic institution, and therefore is never recited in cases of uncertainty.
According to the Ben Ish Hai, another instance in which the obligation is only D’rabanan is when a person remained thirsty even though he ate until satisfied. Hacham Ovadia disagrees and rules that even if one left the meal thirsty, his Birkat Hamazon is still D’oraita. One should avoid entering "disputed territory" and insure that he drinks in a meal that would otherwise leave him satiated. That way he insures that he is fulfilling the Misva of Birkat Hamazon at the Torah level. If he did not drink and then has a doubt whether he recited Birkat Hamazon, the Halacha is a function of this disagreement. According to the Ben Ish Hai, he may not recite Birkat Hamazon, since his obligation is only D’rabanan, whereas according to Hacham Ovadia, he is required to go back and recite the Beracha. To avoid this dispute, one should drink during the meal, if he is thirsty.
SUMMARY
If one ate and drank until he was no longer hungry or thirsty, he is required by the Torah to recite Birkat Hamazon. If he is unsure whether he recited Birkat Hamazon, he must recite it again if he became satiated, but only the first 3 Berachot.
If one is thirsty during a meal with bread, he should make sure to drink.