Not only dreams,
but even while your are conscious, you can get ideas.
I haven't experienced any warnings in dreams but I have experienced ideas and answers to certain tough questions.
I've recieved warnings as ideas while conscious though.
For instance, my girl was coming back from Asia,
she was 6 months pregnant.
For some reason, I asked her to cancel the trip. Something came over me and I forced her to cancel her flight. I have no clue where this came from but it just popped in my head. Anyways, she cancels the trip and everything else is news. Singapore Airlines Flight 006, Oct. 31, 2000........