If you are staying at one of the high-end ryokan (eg
Hiiragiya or Tawaraya), ask them to "air the room thoroughly", pointing out you wish to avoid the smell of cigarette smoke. I'm confident they will do their best to excise the tobacco smell. Some of the cheaper ryokan will also make an effort.