Yes, that could be done, but it could get messy if the company has other third party debts. If the real estate is sold, the proceeds would go to the company. The individuals selling the company would presumably want the proceeds. If the company distributed the proceeds to the selling owners of the company (before the consummation of the stock sale), and in doing so made the company insolvent, the selling owners could incur liability for the distributions.
If you would like to discuss in more detail, please ask for attorney and partner Bill Groh. We can be reached at (303) 688-0944.