Yes, absolutely! Any sensory input will be processed in your brain and thus influence your "sleeping thoughts" which are your dreams.
My husband left the tv on one night as we slept, and in the middle of the night, a History Channel program about Caligula came on. I woke up because I was having nightmares about Roman soldiers marauding!
Better to listen to ambient music as you fall asleep or wake up. I really dislike those jarring clock alarms! Waking up to a horrible buzzing is like hitting my head with an ax! Painful.