Damp Rock increases the length of Rain Dance from 5 to 8 turns, if it is held by the Pokémon that uses Rain Dance.
If the Pokémon that used Rain Dance switches out, the rain will still last for the remaining turns unless another Pokémon enters the battlefield with either Drought, Snow Warning or Sand Stream as it's Ability or a Pokémon uses Sunny Day, Hail or Sand Storm after you have used Rain Dance.
If you use Rain Dance, have a Damp Rock as your held item and decide to stay in it will not increase the length of Rain Dance for any more than 8 turns.
Source: Experience
Hope I helped :)