Graphite does not dissolve, so it has to be suspended and lifted out of the rug. Fortunately, it does not appear to adhere well to ...rug fibers.
Here's what I did, and it worked. I put straight dishwashing liquid (Joy) on the graphite (dry rug) and rubbed it in with a toothbrush. Then I poured a glass of water on it and immediately vacuumed it up (before the water soaked in) with a Hoover steam vac (which was just actually a wet vacuum). I repeated pouring water on it/vacumming it over and over until the graphite and the soap was gone. Also had to reapply the soap a few times. It worked surprisingly well and did not take that long to do.