Yes. The ability to move granted by rogue scout is the same as the general ability to move on your turn
Speed versus movement
Just to clear things up for the rest of this answer, Jeremy Crawford has pithily stated the difference between the two in this tweet:
Speed ≠ movement. Speed is a potential. Movement is an actuality.
Freedom of movement on your turn
Let us look at how using freedom of movement works on your turn normally.
The PHB states a rule that allows you to, on your turn, move up to your speed:
On your turn you can move a distance up to your speed...Your movement can include [...]
Thus, a rule has granted the character the ability to move on their turn only.
And, then you could obviously use 5 feet of that movement to use this part of freedom of movement if you so desired on your turn:
The target can also spend 5 feet of movement to automatically escape from nonmagical restraints, such as manacles or a creature that has it grappled
Freedom of movement with skirmisher reaction on your opponent's turn
We established above that the general rules establish that you can only move on your turn. However, there are features that override that general rule such as Skirmisher Reaction:
You can move up to half your speed as a reaction when an enemy ends its turn within 5 feet of you. This movement doesn't provoke opportunity attacks.
Note the similarities between this specific rule:
You can move up to half your speed as a reaction...
and the general one:
On your turn you can move a distance up to your speed...
Both these things are granting the exact same ability, the ability to move some distance, to the character, just under different conditions. There is no difference either specified or implied between the way in which either ability says "you can move" that would differentiate it from the other.
It makes no sense not to allow "spend movement" with skirmisher reaction
Even the language used supports the fact that you are able to "spend movement" with the movement granted to you by skirmisher reaction.
Freedom of movement says:
spend 5 feet of movement
The general rule on speed says:
Your movement...
And skirmisher reaction says:
This movement...
If even the description says all of these are "movement", why can you not spend them the same way: as movement?
If you do not allow the character to "spend movement" with skirmisher reaction then they also would not be able to stand up from prone, move while prone, or move accross difficult terrain in any way. None of which makes sense, since, again, there is no essential difference between the movement granted on your turn and the movement granted by skirmisher reaction.
Thus, if you can spend 5ft of movement for freedom of movement on your turn, there is no reason that you cannot do it as a reaction at the end of your enemy's turn with skirmisher reaction.
No, the affected target can still move because the spell used its reaction, not its movement to move
On PHB pg. 189, under Your Turn, emphasis mine:
On your turn, you can move a distance up to your speed
and take one action. You decide whether to move first
or take your action first. Your speed—sometimes called
your walking speed—is noted on your character sheet.
On PHB pg. 190, under Reactions, emphasis mine:
Certain special abilities, spells, and situations allow
you to take a special action called a reaction. A reaction
is an instant response to a trigger of some kind, which
can occur on your turn or on someone else’s... If the reaction interrupts
another creature’s turn, that creature can continue its
turn right after the reaction.
So in your scenario the affected target would have used its reaction to move, but then it would still have its action, potential bonus action and movement to be used during its turn. As NautArch pointed out, the wording of the spell is specific in that it states:
...use its reaction to move as far as its speed allows away from you.
The spell says nothing about the creature using its movement for the turn, nor does it state that the creatures movement is impeded in any way. Since it doesn't, there is nothing preventing the creature from using its movement to return to where it was.
If it helps: There are 5 processes that a character can utilize per round. Action, Bonus Action, Movement, Reaction, and Interact With an Object (although this is a relatively minor action and is not paramount to this discussion). Whether you qualify for a bonus action or a reaction is dependent on circumstance, and if something uses one of those, they're independent of the other 4.
So for example: A Battlemaster Fighter using the Ready action to allow a Rogue to slip past an enemy on the Rogue's turn could state: I'm going to Ready my Maneuvering Strike and shout at the Rogue, "Run! I have him distracted!" The trigger will be as soon as the Rogue acknowledges the plan.
So now on the Rogue's turn, the Rogue says, "NOW!" The fighter triggers Ready Action, uses Maneuvering Strike and selects the Rogue as the recipient. The Rogue gets to move up to half their speed using their reaction, so the Rogue moves 15 feet, not triggering an opportunity attack from the enemy. Then the Rogue uses his movement to travel a further 30 feet past the enemy, Cunning Action Dash for another 30 feet, and Action Dash for yet another 30 feet, totalling 105 feet of movement away from the distracted foe.
Another example of this is the Rogue: Scout subclass. At 3rd level they get the Skirmisher ability:
Starting at 3rd level, you are difficult to pin down during a fight. You can move up to half your speed as a reaction when an enemy ends its turn within 5 feet of you. This movement doesn’t provoke opportunity attacks.
And yet another is the College of Glamour Bard, using Mantle of Inspiration:
When a creature gains these temporary hit points, it can immediately use its reaction to move up to its speed, without provoking opportunity attacks.
I hope these further examples help illustrate that your reaction is not limited to mere opportunity attacks and can in fact also apply to movement.
Best Answer
The enemy must actually fully end its turn there
The Scout Rogue's Skirmisher feature states:
The section on "The Order of Combat" states:
It is agreed upon that one's turn ends just before the next person in the initiative order's starts.
But if that were not clear the "Your Turn" section lists what you can do on your turn:
Because these all happen during/on your turn, your turn can only end after you have done these things (or will not do any more of them).
If the developers had wanted the feature to activate at another time they could've used the phrase "When an enemy ends its move within 5 feet of you" or "When a creature enters a space within 5 feet of you". Their wording makes the feature only activate at a turn's end, which is after the enemy has potentially attacked you.
The benefit of this feature is that it allows you to get away from an enemy without provoking opportunity attacks using your reaction whereas normally a Rogue would have to take the Disengage action (using either their action or Cunning Action feature). This leaves both your bonus action and action available for other things.
The feature also provides a significant amount of movement which does not subtract from the rest of your movement for that turn.