There are different mortgage venues available to the buyers - large banks, mortgage companies, local banks and credit unions. All these mortgage providers have their own sets of rules called guidelines. It is best to call on several different lenders to see what their guidelines re. the extra bathroom built without permits are.
Ask your agent to recommend a few lenders for you. Your agent can also call these lenders him/herself.
When appraiser does appraisal, he will point out what he sees - the amount of bedrooms and baths.
He may or may not know if the bathroom was built without a permit...so this could go unnoticed, but you really can't rely on that. If appraiser notices this bathroom issue, he might put "cost of cure" in the appraisal (how much it will cost to fix this issue) - and the value could be reduced by that amount (or by 1.5 times this amount), and this cost could be requested to be set aside by the seller/buyer.
It is best to find the lender who will give the mortgage to the buyer despite the extra bath without permit, before the problems with the mortgage start.
Hope this helps when you talk to the mortgage pros,
Beachfront Realty, Inc.