I know that typically, retourner is used to mean "to go back" and rendre is used to mean "to give back." But on this page: https://www.lawlessfrench.com/grammar/auxiliary-verbs-2/ , which discusses using variable auxiliary verbs in the passé composé, it mentions that retourner can also be used transitively and in that case, it changes its meaning to "to give back." So in the passé composé, can retourner be used in the same way that rendre is?
For example, would both of these be correct?
1. J'ai rendu le livre à la bibliothèque.
2. J'ai retourné le livre à la bibliothèque.