The simple answer is that you can place the clause anywhere that avoids ambiguity.
The example that your book gives, where the placement changes the meaning, is a good one:
He left the gift that he had just bought in a friend's car.
He left the gift in a friend's car that he had just bought.
Since you can buy a car, and you can buy a gift, where you place the clause determines what it is that he bought. In the first sentence, he bought a gift; in the second sentence, he bought a car.
Now, both of these sentences are clear and have the same basic meaning:
A friend of mine at the University of Toronto, who is majoring in electrical engineering, received a government grant.
A friend of mine, who is majoring in electrical engineering at the University of Toronto, received a government grant.
The reason this works is that in effect you have two adjectival clauses, both modifying the antecedent. This is clear when you reword the sentence a bit:
A friend of mine, who is at the University of Toronto, and who is majoring in electrical engineering, received a government grant.
If you have two clauses modifying the same antecedent, either one can go first.