I think you misunderstood the ending: if it was the way you tell it, yes, it breaks its own time travel rules.
What I understood is that Captain America lived his life in the "other" past (other timeline) and then came back when he was old: I remember Bruce Banner saying something about Cap' having used its device to come back. That way, it doesn't break the rules.
Edit to clarify my point of view
Let's say our heroes are in universe A.
When they borrowed the stones from the past, it created another universe. A universe where Loki escaped after the battle of NY, where Sitwell thinks Cap' is with Hydra, where Thanos never snapped etc. Let's call it universe B.
At the end, Cap' went in the past to give back the stones in universe B, but in this universe, Loki still escaped, Thanos still never snapped etc. After getting old, Cap' came back in universe A but didn't "teleport" in the spot where they wait for him. He "teleported" a little further on the bench.
If he hadn't used his device to come back in the universe A, he would never be there.