Is there a cricket rule which states a maximum distance of how far down the pitch a batsman can stand to face the bowler?
There is no Law which specifies this, with the possible exception of anything to do with obstructing the field; the Laws of Cricket are in fact remarkably vague on what the striker may and may not do - it's self regulating by the fact that doing anything "strange" (e.g. standing half way down the pitch) will generally result in the batsman getting out very quickly.
There's no specific limit, but there is a protected area which starts five feet in front of the popping crease, and batsmen are prohibited from damaging this area. This is covered under Law 42(14).
Note, though, that this doesn't prevent a batsman from taking guard within the protected area, but he's going to have to be very very careful not to damage the pitch, and in most cases the umpire will intervene early. Usually just a quiet chat, pointing out spike or guard marks, and asking that he stays outside that area. That would generally suffice - I've never seen Law 42 invoked to punish a batsman taking guard too far forward. Running on the protected area, yes - many times!