I have a question about baseball rules:
Runner starts on first base and goes to third base legally. Now, until the play has finished (I mean the pitcher on the mound with the ball), can the runner go back to their starting base (first base)?
In the MLB Rules, two rules apply under 5.06:
(1) In advancing, a runner shall touch first, second, third and home base in order. If forced to return, he shall retouch all bases in reverse order, unless the ball is dead under any provision of Rule 5.06(c). In such cases, the runner may go directly to his original base.
Rule 5.06(a)/5.06(c) Comment: If a runner legally acquires title to a base, and the pitcher assumes his pitching position, the runner may not return to a previously occupied base.
As such: yes, players may return to bases previously touched (so long as they retouch them in the proper order), so long as there is not a trailing runner (in which case that runner must also cooperate), and so long as the pitcher has not assumed a pitching position.
The simple answer to all your questions is "yes" - runners can retreat if they wish, so long as they obey all the normal rules for running the bases (staying within the base paths, touching all bases, etc).
This is very rarely a good idea of course - about the only situation in which a runner might do this is if two runners end up in the vicinity of the same base, at which point one of them may attempt to retreat in order to avoid an out.