A Royal Navy member has been charged over allegations of working with a foreign power, according to UK police.