Only the top 3 can be picked in the lottery, so they wouldn't be able to win the lottery to get 4th or 5th.
As far as being outside the top 10 moving into the top 3, it happened in 2017.
The top 3 teams set to pick were:
Colorado
Vancouver
Vegas (by virtue of being an expansion team)
ALL 3 teams dropped 3 spots when #1 was won by New Jersey (originally supposed to draft 5th overall); #2 was won by Philadelphia (originally supposed to draft 13th overall; #3 was won by Dallas (originally supposed to draft 8th overall).
So it went from:
Colorado
Vancouver
Vegas
Arizona
New Jersey
Buffalo
to:
New Jersey
Philadelphia
Dallas
Colorado
Vancouver
Vegas
In 2016, when the first three picks were determined by lottery, the top 3 teams supposed to pick were:
Toronto
Edmonton
Vancouver
Toronto won the lottery to keep the #1 pick (Auston Matthews). Winnipeg, set to pick 6th overall, went up to #2. Columbus, set to pick 4th overall, went up to #3. So it went from:
Toronto
Edmonton
Vancouver
Columbus
Calgary
Winnipeg
Arizona
To:
Toronto
Winnipeg
Columbus
Vancouver
Calgary
Arizona