Yes, the Compacts of Free Association (COFA) between the United States and the Pacific island nations of Palau, Micronesia and the Marshall Islands.
Under them, these countries outsource their defense to the United States, who has the responsibility to defend them. In return, the US can freely move troops through their borders, set up military bases and exclude other militaries from entering. The particular passages read:
The Government of the United States has full authority and responsibility for security and defense matters in or relating to the Marshall Islands and the Federated States of Micronesia.
This authority and responsibility includes:
the obligation to defend the Marshall Islands and the Federated States of Micronesia and their peoples from attack or threats thereof as the United States and its citizens are defended;
the option to foreclose access to or use of the Marshall Islands and the Federated States of Micronesia by military personnel or for the military purposes of any third country; and
the option to establish and use military areas and facilities in the Marshall Islands and the Federated States of Micronesia, subject to the terms of the separate agreements referred to in Sections 321 and 323.
The Government of the United States confirms that it shall act in accordance with the principles of international law and the Charter of the United Nations in the exercise of this authority and responsibility.
Section 231 of the Compact of Free Association with Micronesia and the Marshall Islands
and
The territorial jurisdiction of the Republic of Palau shall be completely foreclosed to the military
forces and personnel or for the military purposes of any nation except the United States of
America, and as provided for in Section 312.
Section 231 of the Compact of Free Association with Palau
Like most treaties, these treaties are not binding forever and could be terminated, so I strongly doubt there is a treaty that would prevent Chinese bases forever and against all opposition by the host country. But since termination of a COFA requires either US agreement or a plebiscite, it is rather difficult for these treaties in particular.