Sayyiduna Abu Hurayrah (may Allah be pleased with him) said: "A pledged animal may be ridden and may also be milked."
Imam al-Shafi'i (may Allah have mercy on him) said: The statement of Sayyiduna Abu Hurayrah (may Allah be pleased with him) indicates, and Allah knows best, that whoever pledges an animal that gives milk or is ridden, the one who pledged it is not prevented from its milk and its riding, because he owns the animal itself. So it is milked and ridden just as it was before the pledge. He said: The benefits of a pledge belong to the one who pledged it; the one holding the pledge has no share in them.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الرهن / 11209