Shouldn't the translation read, "你可以借给我你的铅笔吗?"
No. Firstly it'd be more accurately “你可以把铅笔借给我吗？”，secondly it is not (so) idiomatic, hence even though it is a more literal translation the given sentence is preferable.
That is something near what I expected to find.
The current sentence has no mention of "your..."