The only rule that all Grammar books say is - a relative clause should immediately follow the noun/pronoun that it modifies.
But like all other grammar rules, this rule also has exceptions. And it's better to say the rule is flexible. Though sticking to this rule will make perfect sense and make the sentence unambiguous, not leave the readers guessing who or what the relative clause describes.
Yet, there are innumerable examples where this rule is not followed, simply for the sake of sounding natural.
Let's take the following sentence -
Rocks paintings of harp-like instruments have been found in France that date back to 15,000 BC
The relative clause of this sentence is marked in bold. It follows the noun France, but the relative clause doesn't modifies the noun France, rather it describes the noun Rocks painting
We don't re-write this sentence like the following
Rock paintings that date back to 15,000 BC of harp-like instruments have been found in France.
If written this way it would not be considered natural, and would rather look clumsy.
There are other examples as well.
Passes may be issued which will allow access by car, coach or ambulance to the esplanade, but they cannot be issued for performances on Saturdays under any circumstances.
The relative clause modifies the noun passes, but they don't occur exactly after the noun it modifies.
The two example sentences that the writer of the OP mentions are both correct. But I prefer the first sentence #a.