Can a right-of-way boat alter course on top of me?
Only if she gives you room to keep clear. Under Rule 16.1, when a right-of-way boat changes course she must give the other boat room to keep clear. World Sailing Case 6 is the canonical case — the right-of-way boat luffed too late and was penalised.
<iframe width="560" height="315" src="https://www.youtube.com/embed/qLBJpZ8gBxM" title="Sailing Kiwi" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<p><a href="https://sailing.kiwi.nz/start/case-6-changing-course/">Source: Sailing Kiwi</a></p>