On the one hand, the Gemara in Chagigah (15a) quotes Elisha b. Avuyah specifically after his apostasy:
After his apostasy, Aher asked R. Meir [a question], saying to him:
What is the meaning of the verse: God hath made even the one as well
as the other? He replied: It means that for everything that God
created He created [also] its counterpart. He created mountains, and
created hills; He created seas, and created rivers. Said [Aher] to
him: R. Akiba, thy master, did not explain it thus, but [as follows]:
He created righteous, and created wicked; He created the Garden of
Eden, and created Gehinnom. Everyone has two portions, one in the
Garden of Eden and one in Gehinnom. The righteous man, being
meritorious, takes his own portions and his fellow's portion in the
Garden of Eden. The wicked man, being guilty, takes his own portion
and his fellow's portion in Gehinnom.
Likewise, the principle קבל את האמת ממי שאמרו tells us that we do not care about the source of an idea, only about whether it is true (Rambam, Shemonah Perakim, introduction). In a post on the Seforim blog, Marc Shapiro notes that the Ibn Ezra often cites Karaite scholars by name, and R. Moshe Teitelbaum, in his Yismach Moshe, defends this practice:
הנה אנכי שולח מלאך ע' באברבנאל שכתב בשם חכמי הקראים כי זה נאמר על
יהושע, והנה האומר דבר חכמה אף באוה"ע חכם נקרא, ובאמת שהם גרועים כי הם
מינים ואפיקרוסים, מ"מ את הטוב נקבל
Regarding the Gemara in Avodah Zarah 35b in which רבא tells his colleagues not to cite איבו, the Rishonim explain that the problem of citing איבו was that he did not fulfill rabbinic decrees, and therefore did not deserve to be treated as a rabbi in good standing (see Ramban, Meiri, Torat ha-Bayit ha-Katzar 3:7; Ritva: מידה כנגד מידה כי הוא מזלזל בדברי חכמים ז"ל ותקנותיהם ולכן אין מקלסין דבריו בבית המדרש). Thus, as long as it is clear that this individual is not being cited as a rabbi in good standing, there should be no problem of citing him for his ideas.
EDIT: See also this teshuvah (סימן יא) of the Machaneh Chaim in which he discusses this issue, and based on the Torat ha-Bayit says that one can quote the Torah but omit the name of the one who said it.
However, as R. Ari Kahn notes in a shiur on yutorah, the Rambam (Hil. Talmud Torah 4:1) and the Shulchan Aruch (Yoreh De'ah 246:8) rule that one may not learn from a rabbi who has gone astray, seemingly based on the Gemara in Mo'ed Katan (17a), and against the view of R. Meir:
א"ר יוחנן מאי דכתיב (מלאכי ב, ז) כי שפתי כהן ישמרו דעת ותורה יבקשו
מפיהו כי מלאך ה' צבאות הוא אם דומה הרב למלאך ה' יבקשו תורה מפיו ואם
לאו אל יבקשו תורה מפיו
Citing the Divrei Yirmiyahu, R. Kahn also distinguished between learning directly from a rasha and studying his works.
See also this discussion by Dovid Lichtenstein. Noteworthy is his citation of R. Nachum Eliezer Rabinovitch:
A different approach to explaining the Rambam’s view is suggested by
Rav Nachum Eliezer Rabinovitch, in his Yad Peshuta commentary to
Mishneh Torah. Rav Rabinovitch observes that the Rambam links this
prohibition with the prohibition against teaching a תלמיד שאינו הגון –
a student who conducts himself [im]properly. The Rambam establishes that
one should not teach Torah to a student who “follows an improper
path,” but should rather guide such a student towards appropriate
behavior, after which מכניסין אותו לבית המדרש ומלמדין אותו – “he is
brought into the study hall and then taught.” Meaning, a wayward
student should be taught privately until his behavior improves, at
which point he may be allowed to join the beis midrash and learn with
the other students. The Rambam then writes, וכן הרב שאינו הולך בדרך
טובה…אין מתלמדין ממנו – “Similarly, a rabbi who does not follow the
proper path…people should not learn from him.” The word וכן suggests
a degree of parity between these two halachos – the prohibition
against teaching a wayward student, and the prohibition against
learning from a wayward teacher. Accordingly, Rav Rabinovitch
suggests, the second prohibition parallels the first, and thus we must
distinguish between public lecturing and private study. Just as a
wayward student is not allowed into the beis midrash to study with
other students, a wayward teacher is not permitted to serve in any
sort of public capacity, and this is the Rambam’s intent when he
writes, אין מתלמדין ממנו – he may not be allowed to teach groups of
students. Exceptional individuals, however, the likes of Rabbi Meir,
are permitted to study from a wayward rabbi, just as a wayward student
should be taught privately until he is deemed worthy of joining the
beis midrash to participate in public Torah study.
See also Part 2 of his discussion, which concludes:
In light of what we have seen, the following guidelines apply when a
rabbi or educator is alleged to have engaged in inappropriate conduct:
One must not reach any definitive conclusions based on hearsay, and
judgment must be reserved until rumors of misconduct have been
If it is confirmed that the rabbi in question engaged
in behavior that brings shame to Torah, one may not learn Torah from
It is questionable whether one may read a sinful rabbi’s written
works or use his recorded material. Written or recorded material that
the rabbi produced before he became a sinner may be used.
disgraced rabbi has sincerely repented, he may once again teach Torah,
though it would appear that according to some views, there must be
compelling evidence of true, genuine teshuva.
At least according to
some opinions, even after a disgraced rabbi has genuinely and
demonstrably repented, he may not resume his official rabbinic post or
educational position if his reinstatement will create a חילול ה’, or
if the position is an especially distinguished post, such as in the
case of a Rosh Yeshiva.
R. David Brofsky, after considering the sources, concludes:
May One Study the Books of a Disgraced Rabbi?
The answer to this question may depend on why we are not allowed to
learn from a rabbi who doesn’t resemble “an angel of the Lord of
hosts.” One possible reason may be that a student who maintains a
relationship with such a teacher will learn from his behavior. If that
is the case, perhaps his written works may still be studied. (Indeed,
the passage cited above [Chagiga 15b] questions how Rabbi Meir could
continue to learn “from the mouth” of Acher.)
The Divrei Yirmiyahu (commenting on Rambam, Hilchos Talmud Torah 4:1)
holds this position. He writes that “the connection with the evil
person is bad and causes harm and [spiritual] destruction.” A written
work, however, is different. One can separate the good from the bad,
which is why, he argues, the Rambam was allowed to study the written
works of non-Jewish philosophers.
Rav Shmuel Wosner (Shevet Halevi 3:145), however, prohibited reading
even the written works of a Torah scholar who acted inappropriately.
He assumed they “undoubtedly cause harm.”
I believe it is important, especially in our day, to raise three
First, the presence of a disgraced rabbi’s works in our personal and
community libraries causes a great chillul Hashem and reinforces the
notion that the frum community does not properly sanction criminals.
Second, it is terribly hurtful to the victims of sexual crimes to see
the community embrace the scholarship of their attacker.
Third, continuing to study, cite, or even sell the works of a wayward
rabbi sends a message, even if unintentional, that one who commits a
horrible crime can continue to be a respected member of the community.
One who sees the works of a sexual predator, or a criminal convicted
of financial crimes, on the shelves of our homes and sefarim stores
may conclude that we are not fully committed to ridding our
communities of these people. This concern – of sending the wrong
message to others – is why we burn a Sefer Torah written by a heretic:
“in order not to make a name for the heretics or their deeds” (Rambam,
Hilchos Yesodei HeTorah 6:8).
For the reasons cited above, I believe it’s crucial nowadays to
properly distance unrepentant disgraced rabbis and leaders from our
communities, and to discontinue studying and distributing their
written Torah works.