Yes, For most people , to some extent, rubbing too hard or too often does hurt your eyes.
Rubbing will stimulate tears to flow and lubricate dry eyes, also, it can relieve stress. That's because pressing down on your eyeball stimulates the vagus nerve to slow down your heart rate. After stopping rubbing, our eye pressure will return to normal so it won’t cause long term damage. However, for those who have certain eye conditions, an increasingly pressure caused by hard, frequent or prolonged rubbing could cause serious problem. Rubbing can also affect the front of the eye. For long time the increased eye pressure and the mechanical damage can harm the cornea, which will influence your eyesight.