Our Gemara on Amud Aleph states:
Rabbi Elazar said: One who unwittingly eats forbidden fat even today must write down the exact measure that he ate, lest another court come in the future and increase the measure.
The Gemara appears to be saying that the Rabbis of a future Sanhedrin would have the ability to change the halakha, based on how they will interpret matters. Indeed, Rashi says as much explicitly:
…Perhaps the Temple will be rebuilt, and a new [halakhic] court will be established, and a new halakha will be enacted…
This is particularly fascinating because this is in the context of shiurim (minimum amounts required), which our own Gemara states are a halakha lemoshe misinai - a tradition from Moses from Sinai. Apparently the sizes and volumes such as kzayis (volume of an olive), kbeitzah (egg), reviyis (quarter) etc are placeholders for a tradition from Moshe, but the exact nature of how to assess these representative amounts are still open to interpretation.
Indeed, how much could a future Sanhedrin change the Torah? After all, the Ninth principle of faith, as declared by Rambam (introduction to tenth chapter of Sanhedrin), that it is forbidden to add on or subtract from any part of the Torah, oral or written. Yet we also have the Thirteen Hermeneutical principles which are used to interpret the Torah and derive halakha (it is the Beraisa of Rabbi Yishmael, which is recited daily before prayers.) So, the question remains, what powers do a past or future Sanhedrin have to modify or develop Torah law using approved methodologies of derivations? Kinas Soferim on Sefer HaMitzvos Shoresh Beis discusses this at great length. I would like to add some of my own original observations based on Gemaras and Midrashim Which I will quote:
The Gemara (Yevamos 76b-77a) records a dispute that took place regarding King David’s lineage and eligibility for the throne before his inauguration. Since he descended from Ruth the Moabite, and Moabites are permanently banned from entering the congregation. “An Ammonite or a Moabite shall not enter into the congregation of the Lord” (Deuteronomy 23:4)
Amasa brought a tradition he received from the court of Samuel from Rama: An Ammonite man is prohibited from entering into the congregation, but not an Ammonite woman; a Moabite man is prohibited from entering into the congregation, but not a Moabite woman.
In the Talmudic version of this story, The resolution comes from the testimony of Amasa, who had a tradition from the court of Samuel the prophet. Thus, David’s lineage was safe, as he descended from a Moabite woman, who is permitted to intermarry.
Compare this to the narrative in Pesikta Derav Kahane (16), as well as in Ruth Rabbah (7:7)
Pesikta DeRav Kahana:
Boaz said to Ruth, “You travelled to a nation you had not known yesterday or the day prior”. He meant to say, “If you had come a day or two earlier to Convert, we would not have accepted you (for marriage). As the halakha had not yet been initiated, to declare a male Amonite is forbidden, not a female. And a male Moabite is forbidden, not a female.
Ruth Rabbah:
Meanwhile, Boaz had gone to the gate and sat down there. And now the redeemer whom Boaz had mentioned passed by...Rabbi Joshua said: his name was Ploni Almoni ("so and so")". Rabbi Samuel the son of Nachman said that he was ignorant of the words of the Torah. He said: "the first ones (Ruth’s and Orpah’s husbands) did not die but rather because they took her and I am going to go and take her? I certainly am not going to take her. I will not pollute my seed and I am not going to create unfitness for my children". And he did not know that the halakhah had been initiated: Ammonite and not Ammonitess; Moabite and not Moabitess".
It is evident in contradistinction to the Talmud’s narrative, Ruth Rabbah and Pesikta Derav Kahana understood that the rabbinical court ruled, right at that time, to permit a female Moabite, in order to save David’s lineage. Malbim Ruth (1:22) is explicitly in favor of the narrative from Ruth Rabbah and Pesikta Derav Kahana:
The verse that refers to Ruth as “The one who returns from the fields of Moab.”, means to say she is the first returnee from the fields of Moab. That is, she is the first convert from Moab accepted for intermarriage because up until this point in time, they did not yet derive from the verse, a male Moabite, not a female.
From these Midrashim, and actually our Gemara about the kzayis shiur, we see that a Sanhedrin can have broad powers in its ability to change the Torah through interpretation. Of course, as the saying goes, do not attempt this at home.