The reader needs a connection when transitioning into the flashback. That transition can be either external or internal.
By external, I mean introducing the flashback. In this case, the reader knows who's in the flashback so you can use the then-current name without any more explanation. For example:
As he drifted off to sleep, Bob recalled the first time he fought with Tom in kindergarten.
. . .
Stretch raced Tom to the tree and tapped it. "I win again!"
Tom objected. "I'm right beside you! It's only your long arms that let you touch first, but I'm not behind you!"
Stretch crossed his arms. "Don't be a sore loser."
"Bob" never appears in the flashback, but by introducing it as something involving Bob and an argument with Tom, it's not hard for the reader to make the connection. This works because "Stretch" is obviously a nickname; if Bob used to be Joe or Mary this would be more confusing.
If you're jumping into the flashback without context and you don't want to confuse the reader, you can use either name but need to make the connection clear. Here's an example of using the current name:
Bob raced Tom to the tree and tapped it. "I win again!"
Tom objected. "No fair, Stretch! I'm right beside you!" (etc)
In this approach, you'd refer to the character as Bob, but other characters in the flashback would use the nickname. That could be confusing, so use it with caution. That's why I prefer using the then-current name. In this example, notice that I've adjusted the sequence a bit so that the first mention of the earlier name is in dialogue (where you'd need to use that name anyway).
"No fair, Stretch!" Tom slapped the tree a moment after Stretch did.
Stretch, as Bob was called then, looked at his friend. "I won again, fair and square!"
"Only because your arms are a mile long. I was right beside you, not behind!" (etc)
In this approach you make the Stretch-Bob connection once, in narrative, and then set it aside. For the rest of the flashback he'll be Stretch; the narrative note is to connect the flashback to the main story.