I’m not familiar with the legal requirements to calling yourself Captain in your title. Certainly, attaining that rank in the military would do so! It might be sufficient to simply be in charge of a vessel. I honestly don’t know. Again, titles are somewhat fluid and you don’t need a deed to change; the only relevant laws prohibit fraud, so I would speculate that it’s illegal to use the title “Captain” only if you do so in order to imply to anybody that you are a Captain (by any definition of the word).

But I’m not a lawyer: I only really know my way around a couple of specific areas of law, and fraud isn’t one of them. I’m afraid you’ll need to do your own research, or consult a legal professional, for that bit.