Most likely a house back in the '50's probably had 2x4 walls, which won't be sufficient for a second floor by todays standards. I know that older homes (20', '30's) had the fullsize oak 2x4's, but the '50's some of those were starting to get into the smaller size 2x4's and getting away from the hard oak 2x's. So today, using todays lumber, you will most likely have to have 2x6 studding for the lower floor outer walls to support the upper second story. And as stated above, you will need to make sure that the foundation is up to todays standards to support a second floor addition.
As far as cost, for adding a second floor to a 900 sq. ft. house, completely finished, and all, for no bigger than what the house is.....if that little of house is worth $400,000 now, I would guess in Mass. you are easily looking at $200,000 for a contractor to come in and do it. You could knock that price down quite a bit by DIY if you are capable, and the house has a simple footprint to it.
Is there a particular reason that you would want to go up instead of out? Lot size possibly. If you would have a decent sized lot where you could go out, I think if it were me, I would go that route to keep things more in proportion. At 900 sq. ft. now, you most likely have a square box or a small rectangle of around 24x38. being that small, I think a second story would look sort of odd, unless you had a larger front porch to offset the height of the structure.
It's really hard to tell what the cost would be though as a lot of us don't have a clue as to what things cost in Mass. other than being higher than most places, except for a few places in the United States. And then you have to factor in whether you are going to be doing any of the work or just writing the checks. If you are just gong to write the checks, and depending on how you make the outside of the structure look, materials used, brands of windows and doors, if you use high end materials you could be close to hitting a $300,000+ mark. Then you have to consider whether you just tear things down and start completely over, or if you tear everything down except for one wall to grandfather things in, and call it a major remodel. As far as a contractor buying it out from under you, and if cost of adding a second story on is a determining factor as to whether you buy it or not, I think I would take my chance and speak with a contractor. You'll never get an idea unless you have one to look it over.
Or put an offer on it with the idea of leaving it at 900 sq.ft., buy it, and if per chance it cost too much to add on a second story, fix up and update what you have, then resell it for a slight profit.