Yes, there is ambiguity there and the way to remove it is to add more context. By the way, the phrase, 'His classmate Mary.' is not a sentence by itself, but it is a good place to provide the necessary context for understanding.
I can think of at least one other interpretation of the ambiguous communication. The word 'could' might mean that the other students were able or had permission to help.
The student was sick for days. Fortunately, someone could lend him her notes. His classmate Mary offered her help when he returned.
The student was sick for days. Fortunately, someone could lend him her notes. His classmate Mary could have helped, but decided not to because she didn't like him.
The student was sick for days. Fortunately, someone could lend him her notes. His classmate Mary knew that the teacher approved of the students helping each other.
The student was sick for days. Fortunately, someone could lend him her notes. His classmate Mary had made a copy of her notes, anticipating just such a situation.