It is very common that Se’uda Shelishit – the third Shabbat meal – is finished after nightfall at the end of Shabbat. The Shulhan Aruch (Orah Haim 188:10) writes explicitly that in such a case, since the meal began on Shabbat, "Reseh" in added to Birkat Ha’mazon, even though Birkat Ha’mazon is recited after nightfall. Likewise, the Shulhan Aruch adds, if one began a meal on Rosh Hodesh and the meal ended after dark, when Rosh Hodesh had already ended, he nevertheless adds "Ya’aleh Ve’yabo." The same applies on Hanukah and Purim with regard to "Al Ha’nissim." And, of course, when Shabbat falls on Rosh Hodesh or Yom Tob, and one ends Se’uda Shelishit after nightfall, he adds both "Reseh" and "Ya’aleh Ve’yabo" in Birkat Ha’mazon.
Hacham David Yosef (listen to audio recording for precise citation) notes, however, that this Halacha applies only if one ate a Ke’zayit of bread before nightfall. In such a case, since one ate a substantial amount when it was still Shabbat, "Reseh" is recited in Birkat Ha’mazon. Otherwise, "Reseh" is not recited. Hacham David further notes that if one had recited Arbit before Birkat Ha’mazon, or even had recited "Baruch Ha’mabdil" – such as if he needed to do something that is forbidden on Shabbat – then he does not recite "Reseh" in Birkat Ha’mazon. Once he had recited Arbit – which is a weekday prayer – or recited "Baruch Ha’mabdil," declaring the end of Shabbat, it would be self-contradictory to then recite "Reseh" in Birkat Ha’mazon.
The Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909) writes that if one recites Birkat Ha’mazon for Se’uda Shelishit after nightfall, then he omits the word "Ha’zeh" ("this") in the phrase "Yom Ha’Shabbat Ha’zeh." Since it is, technically, no longer Shabbat, one should not refer to Shabbat as "this day of Shabbat" in such a case.
Summary: If one ended Se’uda Shelishit after dark, he nevertheless adds "Reseh" in Birkat Ha’mazon, as long as he ate a "Ke’zayit" before dark, and he had not yet recited Arbit or declared, "Baruch Ha’mabdil Ben Kodesh Le’hol." According to some opinions, in such a case one omits the word "Ha’zeh" from the phrase "Yom Ha’Shabbat Ha’zeh."