Can a 501(c)(3) own a house that is partly used as the organization's place of business and partly used as the home of the board director? Further, can the house be gifted to that board member upon his/her retirement if that is an agreement that has been previously put in writing?
It is permissible for a charity to provide lodging for a member of the board, but it is clearly a potential excess benefit situation and is likely to be subject to an excess benefit tax if the director is not paying fair market rental value for the use of the apartment or treating the value as taxable income. (It is more frequent to see a founder of a charity own the house and provide space to the charity, either free or at fair market value or less.) In rare situations where the charity owns the building, such as when a college president is required to live on campus and use the home for college business, the resident officer may avoid taxable income. It also avoids excess benefit tax treatment if you provide charitable services to a person within the class for which you are exempt for providing services, such as housing for a homeless person who is also receiving support services. But you don’t indicate any facts that would justify either of these exclusions in your situation.
Likewise, it would not be permissible to “gift” the house to the director upon retirement, whether or not the arrangement was in writing. That transfer would be considered compensation and an additional possible excess benefit tax situation. You would need to be sure that the “gift” was considered compensation and that his/her total compensation was not unreasonable. (See Ready Reference Page: “Charities Must Avoid Excess Benefit Transactions”)