Yes, you can do anything in a dream.

And dreams are sometimes weird. For example, in a recent dream I opened a door, walked through it, and ended up in an exact replica of the room I had just been in. I looked back through the door and the room was there as well.

The problem with sex is that you aren't too sure if the thing you're having sex with is suddenly going to change gender, explode on you, fly away, eat you, or turn into a giant gleatnious alien with all intentions of having you for lunch.