Yes, if it is food grade, you can use rock salt for boiling peanuts. Make sure it is food grade.
Table salt, sea salt, Kosher salt, and rock salt are all sodium chloride (NaCl). We suggest 8 tablespoons (1/2 cup) of table salt per gallon of water used when boiling peanuts. Because of the different density and packing of rock salt versus table salt, we suggest that you measure your rock salt by weight, rather than by volume.
Table salt weighs 0.72 ounces per tablespoon (10.5 grams per tablespoon). 8 tablespoons of salt (1/2 cup) weighs 5.76 ounces (84 grams).