This very much depends on the restriction itself, but usually yes, you can sell a property with a restriction - if the conditions can be met.