A piece of dough the size of a pea will not sink down into the flour - just use a a small strainer (like a tea strainer) and work through the top 1/2-1 inch layer of the flour in the bag to remove it.
If you don't retrieve it now - just make sure you sift your flour every time you use flour from that bag in the future to remove it. That little pea bit of dough will become hard as a rock - and you don't want it in your bread, cookies, cakes, whatever ...
"It ain't what you don't know that gets you in trouble. It's what you know for sure that just ain't so." - Mark Twain