If it is a small enough rock that you can pull out of the tank and pat dry then the superglue gel works well. There is also this epoxy.
http://www.drsfostersmith.com/product/prod_display.cfm?pcatid=3962&Ntt=epoxy&Ntk=All&Ntx=mode+matchallpartial&Np=1&pc=1&N=0&Nty=1