Not a character, which would be more convenient because a character has, or can get, characterization and so start running around on his own. A spell, a MacGuffin, a place, needs to be put to use.
But if you do it at once, it can be clumsy. Just what you happen to need got foreshadowed in the last scene -- no, the point of foreshadowing is to plant it early enough so that it can slip from memory until the memory is jolted. You can do it sometimes, if you counterbalance it with other surprises or, better yet, bring it back to cause more trouble in the future.
It's sometimes much, much, much easier to discover a plot twist, even one that blindsides you, needs foreshadowing, and then go back and plant the foreshadowing in the right spot. Sometimes you have to do that even when the foreshadowing springs up on its own accord.