I have a bathroom in my basement of a walkout cellar in MA. I get foul odors only when there is heavy rain or heavy snow. All the rest of the time there are no issues. Not sure if the bathroom was done to code since it was done after house was built and before i bought property which was a foreclosure and bought with stipulation that is was bought as is from bank. The house is on a septic system which was tested and cleaned less than two years ago and i am by myself most of the time so it is not full.
Nice pick up on the house. A lot of folks are discovering that that are some good potential home purchases out there, though as you underscored, sometimes you may inherit some issues. Going forward, remember that all things are negotiable, even those bankers who make it out they they will only sale the home as is. I had a similar situation in the past, but brought in a qualified inspector to evaluate everything in the home from plumbing systems, electrical systems, foundational issues, etc. With that report, which revealed some plumbing and electrical issues, I was able to gain some leverage in the negotiations around the price of home and an allowance was made.
It would appear your situation with the bathroom in the cellar sounds like you have back-up odors stemming from the sewer system. The are a couple things that could be contributing to this foul odor problem. One could be associated with the way that the toilet is seated to the floor. You should test by clutching the toilet and giving it a wiggle to see if the toilet is secure. The problem could be as simple as re-seating the toilet properly, replacing the seal.
The issue could also be associated with the improper venting of the odors, hence evaluate if your vent stack is obstructed. That is my suspicion given your report that the smell seems to emerge when there has been heavy rain or snow. The build up of sewer gases could be exasperated by these weather events and improper ventilation would work against you. Sometimes birds or squirrels will nest up at the top of the vent stack.