The Shulchan Aruch · Orach Chayim
אורח חיים תרס״הOrach Chayim 665
Siman 665 of 697 in Orach Chayim — 2 se'ifim
הלכות לולבLaws of the Four Species· siman 665
Se’if 1א׳
אֶתְרוֹג בַּשְּׁבִיעִי אָסוּר, שֶׁהֲרֵי הֻקְצָה לְכָל שִׁבְעָה, וַאֲפִלּוּ נִפְסַל אַחַר שֶׁעָשָׂה בּוֹ מִצְוָה אָסוּר כָּל שִׁבְעַת יָמִים; וּבִשְׁמִינִי עֲצֶרֶת, מֻתָּר. וּבְחוּצָה לָאָרֶץ, שֶׁעוֹשִׂים שְׁנֵי יָמִים טוֹבִים שֶׁל גָּלֻיּוֹת, אָסוּר אַף בַּשְּׁמִינִי וּמֻתָּר בַּתְּשִׁיעִי, וַאֲפִלּוּ חָל לִהְיוֹת בְּאֶחָד בְּשַׁבָּת; וְיֵשׁ אוֹסְרִים בְּחָל לִהְיוֹת בְּאֶחָד בְּשַׁבָּת.
It Is Forbidden to Eat the Etrog on the Seventh Day, 2 Seifim: It is forbidden to eat the etrog on the seventh day because it is dedicated [muktzeh for its mitzvah] all seven days. Even if it is invalidated after performing the mitzvah, it is forbidden all seven days. On Shmini Atzeret, it is permitted. Outside of Israel where they do two days of Yom Tov, it is also forbidden on Shmini Atzeret, though on the ninth day [Simchat Torah] it is permitted, even if it is Sunday. There is one who forbids it if it falls on a Sunday.
Se’if 2ב׳
הִפְרִישׁ שִׁבְעָה אֶתְרוֹגִים לְשִׁבְעָה יָמִים, כָּל אֶחָד יוֹצֵא בּוֹ וְאוֹכְלוֹ לְמָחָר; אֲבָל בְּיוֹמוֹ אָסוּר, שֶׁהֻקְצָה לְכָל אוֹתוֹ הַיּוֹם.
If one dedicated seven etrogs for the seven days, one for each day, each one can be used for the obligation and then eaten the next day. On its day it is forbidden because it is muktzeh for the whole day.
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0