Yes, as long as the subject (patient) is animate.
私が叱られた先生 the teacher I was scolded by
私が財布を盗まれた泥棒 the thief I had my wallet stolen by
私が降られた雨 the rain I got caught in (indirect passive)
Note that, however, the core meaning of the Japanese passive is telling the subject's status being affected by others' action. Thus if you don't have intention to focus ...
they prefer using a passive voice
It's not that we prefer passive voice but the speaker being the subject of the sentence rather than the third party. (Animacy hierarchy) Anyway, it's true that those example sentences are natural in this regard.
Is my correction (the second sentence) better?