Dream Eater's triggered ability goes on the stack without a target. While that ability is resolving, after you've surveilled, the reflexive triggered ability triggers and you pick a target nonland permanent to be returned to its owner's hand. This is different from effects that say "If you do . . ." in that you choose the target after having surveilled.

Artwork
Loading artwork…
Dream Eater
Duskmourn: House of Horror Commander · #116 · EN
Nonfoil—Foil—
Card rules
Flash
Flying
When this creature enters, surveil 4. When you do, you may return target nonland permanent an opponent controls to its owner's hand. (To surveil 4, look at the top four cards of your library, then put any number of them into your graveyard and the rest on top of your library in any order.)
4/3
Mythic · Illustrated by Daarken
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
Pioneer Legal
Timeless Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
Dream Eater's reflexive triggered ability triggers even if you have fewer than four cards in your library to surveil.
When you surveil, you may put all the cards you look at back on top of your library, you may put all of those cards into your graveyard, or you may put some of those cards on top and the rest of them into your graveyard.
You perform the actions stated on a card in sequence. For some spells and abilities, you'll surveil last. For others, you'll surveil and then perform other actions.