As in presumably any natural language, it is possible to be ambiguous in English. When it happens in speech, one of three things happens: (1) the listener figures out what was meant through context, etc, (2) the listener misunderstands, or (3) the listener asks for clarification if the exact meaning is important to the listener.
Ambiguity in formal written English may be purposeful or inadvertent. One purpose of rewriting is to catch and correct inadvertent ambiguities. One reason to avoid wordy sentences is that ambiguities seem to thrive in such sentences. Let's take your original sentence.
"Last month, I bought a best seller" is briefer than your original and now clearly refers to when I purchased rather than to when the book was selling briskly.
"I bought last month's best seller" is again brief and now clearly refers to when the book was selling briskly rather than to when I purchased.
What if I wanted to indicate both ideas?
"Last month I bought what was the month's best seller."
All three sentences contain fewer words than your original sentence and express a completely unambiguous thought. In my experience, writing concisely helps avoid ambiguity.
EDIT: I agree with the comment that the meaning of your original sentence ought to refer to when the book was a best seller and that most listeners or readers will construe it that way. Unfortunately, the speaker or writer may not have intended it that way. Misunderstandings happen.