Would "... wrth yr athro" also be correct?
Certain prepositions follow particular verbs/verb-nouns to convey specific meanings:
Isn't it normally rhaid i fi ?
You’ll hear both forms in Wales.
Does this line suggest that I need to borrow the teacher's ruler, or does it suggest that the teacher told me I have to borrow any ruler?
I'm not sure how you arrived at that second meaning? I'm just a beginner but there's nothing here about the teacher saying anything.
I arrived at that second meaning via my own interpretation based on my native tongue.
Well then, no, that's not a valid translation of this sentence.