I don't think あなた is considered rude, basically.
Normally it's rather thought of as the polite expression of "You".
The famous one as a rude meaning word is あんた.
This word is what people use when they get angry at what the others did/said to them, and attempt to tell it to the others.
However, there's a chance that people would think あなた as a kind of rude expression but it's a very limited and technical situation in a way.
It can be a rude expression when someone dares to use あなた even though they know your name and they have been used the name to call you so far.
It is like, using too much polite expression that's not appropriate for the occasion, it can be an indirect disdain expression.
(You can tell it by the fact that their way of calling you is suddenly changed, and from their attitude/their facial expression.)
Why Japanese people take it badly in a certain situation like that even though あなた is basically a polite expression. It is related to the Japanese people's way of thinking.
Japanese people divide people's impressional categories within their minds.
As an ally(people who belong to you and your territory/field. Like family, friends, coworkers who're close to you, people who’re your side)
or the others(who're not, like strangers to you, people who have different opinions against you= enemy-like existence to you)
It's called inside ウチ and outside ソト concept/thinking.
So this explains the situation above.
あなた is basically thought a polite way of calling 'you', and it can be used when you don't know their name. (let's call it usage B)
Even though they have been calling you by your name, changing a way of calling people into あなた on purpose and all in sudden in a conversation, it means that they came to want to take a mental distance from you.