You can use real rocks for sure, but painting them is usually the best option.
This base has a real rock on it:
While these rocky bases made from:
The rock on this base was a piece of bark mulch:
In the case of the large rock on the Stormfang Gunship base, I used low temperature hot glue to secure the rock to base and the bond is great. With smaller rocks, using super glue works fine.