I don't think it should be against server rules, but i frown upon it myself, if i get caught i try to run or fight rather then dock, unless i'm already docking when they say something.
If only we had some sort of on/off switch that the lawfuls could flick to stop docking on a particular base for a few seconds if they saw someone had contraband, it's a bit more useful then ordering them to drop the contraband while they ignore you and dock anyway.