Assuming the twenty turns is up:
Enter diplomatic negotiations with whatever civ you want to cancel the agreement with, and click on "Active Deals" (near the bottom). The ROP agreement will be listed. If the twenty turns isn't up, there'll be a number next to the deal and the text will be greyed out. Otherwise, the text will be black and no number will be listed. Renegotiate the deal or cancel it from there.