Sounds to hard.... But it would be worth it
It's actually pretty simple.
If you plan on going on hiatus, deny someone's request to move on the last day you're playing. This generally means nobody will try to move until you check in again.
Whenever you go back to the game after not playing for some time, just choose "start a new save" (or whatever it's called) from the main menu. Go through the sequence on the train, when you arrive at the station Porter will give you a town map and tell you Isabelle is waiting for you at the town hall. Don't go to the town hall, just check on the map if anyone is missing. If not, go around with that character and check if anyone is in boxes. If they're outside they're not in boxes, if they're indoors just go in and take a look around.
If nobody is in boxes and nobody has moved, load the game normally as your mayor.
If someone is in boxes or has moved, use the 3DS clock to set time to the day you last played (you can use the 3DS activity log to check when that was if you're not sure) then load as your mayor and stop that villager from moving. They'll usually just ping you when you walk in front of them. If they don't, talk to them several times and see if they mention moving. If not, save and quit, reload as your mayor. Go find that villager again, if they don't ping talk to them a few times. Rinse and repeat until they ask for your permission to move.
If nobody does and you've tried it a few times, check if there are any events coming up on that week. If so, nobody will ping you to move, so just TT to after the event and try to get that villager to ask again. If there are no events coming up, try TTing to the next day.
Once you have denied that villager's request to move, you can set your 3DS clock to your current date and load the game normally (if you want to be extra safe, you can start a new character just to check the map, then exit without saving, and load as your mayor if nobody has).
Like Bearica said, it's lengthy to explain but it's not that complicated. The basic principle is that, if you deny a villager's request to move on your last day before a lengthy period of not playing, nobody will move. The other principle is that if you didn't do that, you can use a new character to check if anyone's moving out, and if so, you can trick the game into thinking you're still on the date you last played, load your mayor to ask that villager to stay, then TT to the present.
Also, since you didn't do that, you could try to use the 16-villager cycle to get your villager back. I haven't used it but from what I understood, it's something to do with if you go through 16 villagers, the move-out will return. There's lots of tutorials on it out there, especially here on the forum and on tumblr.