Well that is true in theory. But it's also the case that there are no border checks within the Schengen area, so you should be able to move around as much as you like in practice.
That’s potentially dangerous advice. I’ve seen police go through a train asking people for papers passing between Schengen countries. Just because the chances of being caught are small doesn’t mean it’s a good idea to do something illegal wrt to immigration.
> it's also the case that there are no border checks within the Schengen area
While this was true before, it's increasingly not like that anymore. The border between Spain-France has historically been easy to pass without proper checks, they are checking more and more individuals crossing the border. As I've been told, the increase is happening across other borders (in EU/Schengen) as well.
While sometimes they don't check at all, it's possible they do random controls. So keep in mind that you might not be able to pass the border without proper identification.