Some roles have stricter nationality and residency requirements than others for security reasons, but in general you can join the Royal Navy if you are:
A national of the United Kingdom or Ireland
A Commonwealth citizen who is applying from inside their own country must be 18. If a resident of the UK you can apply at 16. You must hold a current in date passport and it is the responsibility of individual applicants to ensure that they have permission to be in the UK and this permission is valid for the entirety of the recruitment process up to the point of entry (this does not apply to citizens of the Republic of Ireland, Malta and the Republic of Cyprus)
A dual Commonwealth or British national who is not required to complete national service (written evidence is required)
A British national living abroad
Some UK units do run SNCO exchange programmes with US. Apart from the odd and limited adventure training exchange ( Ex UK/USANG) there is nothing available at junior level for obvious reasons.