If money is transferred into Sri Lanka, can it be taken out if the property is sold?

Yes. The same IIA can be used to repatriate the capital invested and the profit earned (if any) along with any rental income earned on the property.