Realizing topological edge states with Rydberg-atom synthetic dimensions