I borrowed a friends Wynaut for the bird quest.
I tried sending it back, the send back to owner button disappeared and 20 seconds later I got the "you successfully returned the lent pokemon" pop up, but I still had it. He tried re-logging. I still had it.
Should've waited for the last hour of the lend to see if it'd send back but I traded it back instead.