For the source text click/tap here: Sanhedrin 30
To download, click/tap here: PDF
The Tashbatz (II § 128) takes issue with this statement, for we find many other places in Shas which clearly indicate that Chazal gave credence to dreams (to name a few; Nedarim 8a, Brachos 55a, Yevamos 93b).
The Shulchan Aruch (O”C 220:1) rules that one who had a disturbing dream and it distresses him, he should make a hatavas chalom in front of three friends, and they should tell him “you dreamt a good dream....” This recital, in which the potency of the bad dream is nullified, is printed in many siddurim.
This should be done in the morning, and during the recital he should remind himself of the dream. When one has a bad dream, it is a mitzvah to recite the hatavas chalom, even on Shabbos.