I think "a" can mean "one of many" while "the" means "unique" or "definite" depending on context, Could you please see if the following is correct?
1.Canada is a country of freedom. => There can be other countries of freedom.
2.Canada is the country of freedom. => Canada is the unique country of freedom, there's no other country of freedom.
Your analysis is correct. However, 'the' used in the context of the second sentence can also mean 'the epitome of, or the greatest manifestation of.' For example: 'The New York Yankees are the team this year." Obviously there are many other baseball teams; but the writer means to emphasize that the Yankees are the greatest team at this time.