Can a domain registrar include a clause which prevents users from transferring the domain to some other registrar? Is it legal as per ICANN rules?
You should read the policy regarding this as it answers your question. http://archive.icann.org/en/transfers/policy-12jul04.htm