Well your picture (althought small) shows O Scyllarus, so it wont be that, don't beleive the hitchike in LR.
Where is the rock from?
Most hitchiking mantis dont get much bigger than a few inches, and in a reef are more or less harmless (to me anyway having had them for some time). But TBH, i think your octo will probs make a meal of it soon.
Agreed though, for octo safety (just in case) probably best to remove, if it is.
As far as fresh water dipping, yes it will work, but not very friendly,
It would be left in the fresh water and could suffer from osmotic(?) shock.
If you do remove the rock, hold it over a bucket of normal salt water, and flush with a little carbonated water. It will then pop out directly into salt water, and shouldn't take harm from this.
Again, lol, if it were me, that rock would go into another tank, or my sump until i could find a new home.