We have no idea when the Rommis or Klinks stumbled upon Klach D'Kel Brakt
Nor do we know how many other parties possessed the planet and the region prior to it being the Romulan's territory. That particular area of the galaxy could have been trading hands for hundreds of thousands of years, as various major interstellar powers rose and fell from existence.
Did the civilization that the Baku originally came from claim the region at some point? There no canon indication of such. Given their numbers and lack of resources to do so, the Baku would seem to be incapable of doing so themselves. They certainly could not control the area.
At no point during the movie did the Baku ever claim (or suggest) that the planet was theirs.
wasn't there some treaty that forbade the Fed from using cloaked technology?
The holo-ship could have been the Sona's property, and not the Federation's. The Federation interacts with the Klingons, who have cloaking technology, without violating the treaty with the Romulans.
Commander Riker was briefly in command of a Klingon ship (with a cloaking device), no treaty violation.