Repeated soakings in water & possibly (if that doesn't work well enough) a quick & light dose of one of the "less volitile" insecticides, followed by a rinsing & soaking in clean water to wash it out, may be enough to kill off the bugs & still leave the moss in a happy state.
While most plants can deal with such a treatment, test a small portion perhaps, as different mosses are a bit more sensitive than most plants.
IMO, the bugs should be either killed off or made uncomfortable enough to leave (like the drowning in water does) before the moss is affected. But do use care. (Again, mosses are sometimes real sensitive.)
I don't know where you plan to put the rock/moss, but setting it in a large tray of water may be enough of a barrier to prevent any remaining bugs from making it into your other plants or home.
Good luck, and be sure to show us pictures if you get a chance.
PS: The hardest part about growing mosses that I have had, is giving them the cool, damp, well lit but not sunny environment that they seem to want on a consistant basis.