what does it mean for  a ship to be flagged by another country
The flag flown is related to the country of registration : so much so that the word "flag" is often used symbolically as a synonym for "country of registration".