Is it thrusting like it's grazing on the rock or like it's scratching against the rock?
I've read that fish will appear to "scratch" against stuff if they are sick/infected (ich, fungus, etc.)
I'm no expert and could be wrong but keep an eye on your fish, look for signs of stress or ich, and be...