When three men eat a meal together, and the meal consisted of bread, they recite Zimun before Birkat Ha知azon. This applies even if only two of the three ate bread, and the third ate a Ke築ayit of other foods, such as fruits or vegetables, or drank a Rebi段t of a beverage. Even though only two men ate bread, the three of them can make a Zimun provided that the third ate or drank something with them.
If one of the three men, for whatever reason, recited Birkat Ha知azon without waiting for the Zimun, may the group still recite a Zimun, or was the opportunity lost once the third person recited Birkat Ha知azon and thus separated himself from the group?
The Shulhan Aruch (Orah Haim 194:1) writes explicitly that the group should recite a Zimun in this case. Although the third person separated from the group by reciting Birkat Ha知azon without a Zimun, he cannot affect the Zimun obligation of the other two. Therefore, the other two still bear the obligation of Zimun, which they can fulfill by including the third, even though he had already recited Birkat Ha知azon.
The Magen Abraham (Rabbi Abraham Gombiner, Poland, 1637-1683) imposes an important condition on this Halacha. He writes that the Shulhan Aruch痴 ruling applies only if all three individuals ate bread. In such a case, one person痴 separation does not affect the Zimun obligation of the other two. If, however, one of the three ate other foods, such as fruit, then his recitation of Birkat Ha知azon without a Zimun indeed undermines the Zimun obligation of the entire group. Even though his partaking of fruit suffices for the three individuals to bear an obligation of Zimun, as discussed above, once one of the people separates from the group by reciting Birkat Ha知azon, they lose their status as a group with respect to Zimun. Only if all three people ate bread can they recite a Zimun even if one of the three had already recited Birkat Ha知azon.
The Magen Abraham痴 ruling is codified by Rabbi Moshe Halevi (Israel, 1961-2001), in his work Birkat Hashem (vol. 2, p. 492; listen to audio recording for precise citation), and this is, indeed, the Halacha.
Summary: Three people who ate together must recite a Zimun before Birkat Ha知azon if all three ate bread, or if two ate bread and the third partook of other foods or a drink. If all three ate bread, then they may recite a Zimun even if one of the three recited Birkat Ha知azon before the Zimun. If only two ate bread, and one of the three recited Birkat Ha知azon without waiting for a Zimun, then the other two can no longer recite the Zimun.