It looks like it's coming from Bereshit Rabbah 49:2 on Bereshit 18:18, which says:
אָמַר רַבִּי יְהוּדָה בְּרַבִּי סִימוֹן לְמֶלֶךְ שֶׁהָיוּ לוֹ שְׁלשָׁה אוֹהֲבִים וְלֹא הָיָה עוֹשֶׂה דָּבָר חוּץ מִדַּעְתָּן, פַּעַם אַחַת בִּקֵּשׁ הַמֶּלֶךְ לַעֲשׂוֹת דָּבָר חוּץ מִדַּעְתָּן, נָטַל אֶת הָרִאשׁוֹן וּטְרָדוֹ וְהוֹצִיאוֹ חוּץ לַפָּלָטִין, שֵׁנִי חֲבָשׁוֹ בְּבֵית הָאֲסוּרִים, וְנָתַן סְפָרְגִים שֶׁלּוֹ עָלָיו, שְׁלִישִׁי שֶׁהָיָה חָבִיב לוֹ יוֹתֵר מִדַּאי אָמַר אֵינִי עוֹשֶׂה דָּבָר חוּץ מִדַּעְתּוֹ. כָּךְ, אָדָם הָרִאשׁוֹן (בראשית ג, כד): וַיְגָרֶשׁ אֶת הָאָדָם. נֹחַ (בראשית ז, טז): וַיִּסְגֹּר ה' בַּעֲדוֹ. אַבְרָהָם שֶׁהָיָה חָבִיב עָלָיו יוֹתֵר מִדַּאי, אָמַר מָה אֲנִי עוֹשֶׂה דָּבָר חוּץ מִדַּעְתּוֹ.
It was Rabbi Yehuda, son of Rabbi Simon who made the observation.
This quote from the midrash explains in connection with G-d's questioning the idea of concealing the judgement against Sodom from Avraham, that G-d had a special love (that he was cherished more than appropriate) for Avraham above and beyond others (Adam and Noach are listed as examples of those not loved like Avraham. Thus, Adam was separated and Noach was imprisoned at the time of judgement.). And that because of that special type of love, G-d sought Avraham's opinion in things that G-d would do to the world.
Regarding your association of Moshe Rabbeinu to this special type of merit connected with Avraham, the beginning of the linked midrash explains how this merit from Avraham was passed along to the 70 individuals who descended to Egypt, who ultimately became the 70 Elders who transmitted the teachings of Avraham to Moshe, who explained the Torah in 70 languages.