As far as I know in the US it is legal just considered unethical. I ended up having a great friendship with a T I worked with for three years. Hated her as a T and got nowhere with her. Love her dearly as a friend and spent many happy vacations staying in her home with her and her husband (they live in my home town and it was a safe, welcoming place to stay when visiting family but not wanting to stay with family).
I would say IF any harm was done it was in her not referring me out to another T when it was clear we did not work well together. I have no regrets or concerns about the friendship.