What was the law before a drasha (a law derived from the 13 middos) was made? Were all the laws given at Sinai, and only their sources derived from the Torah by Chazal, or did Chazal learn new laws from the Torah using the system of the 13 middos, and before they made those drashos the law was, in fact, different? I have been told that there is a dispute about this; I would like to know all sources from Chazal, Rishonim, and Acharonim which discuss this.
I can't give you all sources, but a brief summary of the Rambam:
The Rambam discusses two types of derashos.
In his Introduction to the Talmud, the Rambam discusses derashos in which the halacha is not in dispute, just the scriptural source is - the drasha is merely an attempt to identify the source, and the halacha preceded the source. An example is the פרי עץ הדר being a citron. In Sefer Hamitzvos Shoresh Sheni, the Rambam explains that this was in order to "להראות חכמת הכתוב" to demonstrate the wisdom of Scripture.
The second is discussed in the Introduction to the Yad Hachazaka. Here he discusses derashos which are "דברים שנתחדשו בכל דור ודור ... שלא למדו מפי השמועה" - newly discovered in each generation, and were not learned by transmission. In Shoresh Sheni, he qualifies that these derashos are limited to branching off of existing Mosaic laws - "הם ענפים מן השרשים שמאמרו לו למשה"
Ohr HaChaim to Vayikra 13:34 implies all derashos are only conclusive with an independent tradition:
Rashi in Pesachim 61a could be understood to mean that Chazal did not have the right to apply the rules of exegesis without a pre-existing tradition from their teachers, with the exception of Kal V'chomer:
Rashi contrasts Kal V'Chomer with Gzeira Shava as being allowed. This could be understood to mean that this is the only one which is allowed (otherwise, why should it be singled out?)
Doros HaRishonim (a relatively recent work on Talmudic methodology by Rav Yitzchak Isaac Rabinowitz) Chelek 4 ch 7 goes even further, and maintains that the first type of derasha is the only type of derasha, according to all opinions, and all halachos were known through mesora and they were only finding hints in the Torah.