I'm specifically thinking of the flight of Mary, Joseph, and Jesus from Palestine to Egypt to escape Herod, but this question would apply to any situation. Could free people legally get up and move from one area of the empire to another? Were there legal hurdles?
Your question is complicated because your status was not merely determined by "free" or "unfree" but what level of citizenship (if any) you possessed, where in the empire you were traveling through, and at what time in history to which we're referring.
The basic answer however is no, there were not in general major legal barriers to internal travel in the Roman Empire.
Really it wasn't a major issue as few people traveled anyway. Infact, the greatest barrier to travel were material resources as it was prohibitively expensive and dangerous with little incentive and it seems the Hoi palloi didn't travel much at all.
The fastest mode of travel was the cursus publicus, which was a network of state run horse relay stations which functioned as part of the post office. It would require Imperial permission to use and would only be available for the very rich.
There would also be toll stations which would further discourage the poor to travel.
In reference to the flight to Egypt you mentioned, it seems likely this was not a historical event but rather a fabrication by the author(s) of St Matthew's gospel to draw a parallel between Jesus and Moses.