The legislation comes amid a heated debate among major real estate players over private listings. The dispute is especially fraught in Washington, where private listings are already rare.