Out of personal experience here, I was able to unlock both an iPhone 6 & iphone 6 Plus under the 2-year contract via the At&T request unlock website within 5 minutes of the request.
Both phone were purchased under the 2 yr contract on the first day they came out. What I have seen on here, it's been hit or miss on unlocking it via the website.
Some people have attempted 2 times and have received the unlock request successful while others have attempted 7+ times & have also received the unlock successful. In retrospect, some have attempted 3 times and have been unsuccessful.
----------
You're technically both wrong AND right in your statements.
You CAN unlock if the phone is still under contract because I have been able to do so with 2 of the phones under contract.
However, according to AT&T, you technically shouldn't be able to unlock your phone until you are out of contract.
I tried the first time, requesting both phones to be unlocked, purchased on the 1st day they came out and both were successfully unlocked on the first attempt.