At the time of Apollo 11, there weren't any systems in place for a surface rescue, but several possibilities were explored during the development of the Apollo program.
One of the more promising was the Gemini Lunar Rescue Spacecraft, which would be based on the older 2-man Gemini capsule.
This would either land uncrewed near the planned landing location for the crew to escape in, or just wait for a rescue mission to be assembled. Alternatively it would act as the rescue craft, with additional seats for the stranded Apollo astronauts as well as its own crew.
Oddly, this was vehicle was planned to use two Apollo service modules as upper stages to boost it to the moon. I'm not sure why the SM was chosen though, since a large portion of its internal volume was devoted to life support equipment