This happened back in 2015 (I don't remember when it exactly happened, but it was a true story)
One day, my parents went away for something important, leaving me and my older sister in our house. We decided to watch TV for entertainment.
After a while, I decided to take a shower. When I was done, I called my sister to get a towel, but after calling her, the lights in my kitchen and dining room started flickering by themselves. I didn't hear the sound of the light switches being pressed constantly, so I was a bit scared. Then an empty water bottle was thrown into a wall with medium force, which I thought was my sister's pranking me.
When I dressed up, I asked my sister if she flipped the light switches constantly and threw a water bottle earlier as a prank, which she said she did not do because she was watching TV the whole time. I started to think our house was haunted by a poltergeist for a moment when she said that.
To this day, I haven't forgotten what I experienced at that time.
The following story happened back in 2016.
My parents went away to my relatives' house after coming home from school. When they were gone, I decided to hop on my PC to play games non-stop until my entire room was dark except for the bright light coming from my PC's monitor.
In the middle of my game, I thought I heard something strange, so I thought it was just my game making such a noise, but as I took off my headphones, it wasn't. The sound was coming from my backyard. I got off my PC to check it out with a flashlight.
I looked through our bedroom window to see what it was, and when the moon started shining brightly, I saw the silhouette of a ghost standing beside our tree, so it sent a cold shiver down my spine. I was paralyzed for a moment while looking through our window.
When I rubbed my eyes, the silhouette disappeared. I was relieved, although it sent another cold shiver down my spine.
I thought these stories happened because my sister thought our house was formerly a cemetery, and she was teasing me with things like, "There is a ghost behind our school classroom."
Perhaps that is what you experienced, thus rubbing your eyes made the shape vanish. Then again, it could well have been paranormal. Hard to say.
(+_+)