The story child Zelda starts to tell in the dream is the classic ghost story Lost Hearts by M R James.
All of the songs Hal sings in his drag act (both in real life and in dreams) were originally sung by Ethel Merman in the Broadway musical 'Gypsy.' Dreams are a recurring theme of the musical.
The scene on the beach with Dream, Lucienne, and Gault is very reminiscent of several Salvador Dali paintings, particularly Hallucinogenic Toreador. Dali would sit with a spoon over a metal bucket. When he fell asleep he would dream, and drop the spoon, The sound would wake him and he would paint what he saw in the dream.
In each of Ham's 2 connected dreams, his drag persona appears to be Lucy Ricardo, from "I Love Lucy" et al.