also - it sounds as if you're looking at homes on your own - mistake. working with a realtor who represents YOU AS A BUYER - is a more sound strategy. it costs you nothing more (and if it did - it would be money well spent). buying real estate is not like buying a car. you can go out and buy a car on your own (and people still mess that up) - this is a HUGE financial decision. you're going into this asking questions on trulia when if you had a BUYERS AGENT representing you - (and they knew what they were doing :) then you would know that the first hurdle is the mortgage and underwriting of the loan.
illegal kitchens, pools, dormers etc can be big obstacles to buyers getting loans. banks aren't messing around.
you can certainly work this out - but FIRST KNOW THE BASICS - you don't want to get into contract and then have to deal with all this. plan first - make offer and the planning ahead will help pave the way to a hopeful "smooth" closing.
Call the town and see what their requirements are to have a legal accessory apartment. It might be that this apartment meets all the criteria and the sellers did not want the permit because they would have to claim income. They also may have a relative in the apartment who is not paying anything.
the town will tell you what the application fee is and the annual cost which is not usually very high for renewals. Good luck with it.
Here where I live, you can rent even if its not a legally zoned apartment or additional dwelling unit on the property. They don't bother you about it unless someone formally complaines about you. You cannot advertise the property in a listing to sell that your property has an apartment unless it is a legal one and you cannot use it for loan purposes etc.....