Is professorship (assistant/associate and full) a title or a position? Unless I am mistaken, somehow, if you have defended a PhD then you have a Doctorate degree, which means you are a "Doctor". That remains to be the case, even if you leave academia and go work in industry, or travel the world or whatever. 

Does the same thing apply for professorship? In other words, is it so that once you receive professorship, you are indeed always a professor? Or is it connected to your employment as a professor? 

And of course there is the middle ground, where you might have assistant or associate professorship and choose to leave academia? Do you then revert back to being a "John Smith, PhD"? Or remain to be "John Smith, Assoc Prof"? 

As a follow up question: Does this vary from country to country as well, or is there a generally accepted rule of thumb?
In the US there are no legal rules. I think that few people would use Associate Professor as a title, but rather as a description of the post they currently hold. They would probably use Professor as a title, however. It is a descriptive title even before elevation to Full Professor. Students normally call them "prof" in many places. But the "title" is descriptive, not formal. It is a term of respect when used in this way. 

However, if a person leaves academia for some other profession, it is unlikely that they would use professor and variations as a title. They might describe themselves as "former professor". 

After retirement you might be "professor emeritus", again a description. On your tombstone you might be "Dr. Stone, Professor of English", the final description. 

Other places are more formal about such things, but in the US, not so much. 



I am actually "Professor Emeritus", which I interpret to mean that I didn't unforgivably disgrace myself before I retired.