Lawmakers in several states are moving ahead with legislation to prohibit or limit noncompete agreements for certain doctors and other health-care professionals amid concerns that the FTC’s attempt to ban noncompete clauses nationwide will be blocked.