Put on two or three layers of panties, a bikini bottom is particularly effective in some cases. If that doesn’t stop you then a tight pair of shorts will do the trick.
If that fails then you’re only allowed to do your edging kneeling, firstly on the bed or sofa, and then again, failing that, on the floor where you can’t rub or grind on anything.
An alternative that I’ve employed before is to tie your legs open, lying on your back. No grinding possible then. Make sure you know how to safely tie knots without cutting off circulation, or invest in some velcro bondage straps.