"To perfection" is often used in a sense of "perfectly." "The steak was grilled to perfection." "It's impossible to attain to perfection" looks incomplete. It is the equivalent, to me, of "It's impossible to attain perfectly." My mind immediately jumps to "Attain what?"
Allow me to disagree with the two preceding responses. To my ear both "attain perfection" and "attain to perfection" are quite natural and correct. And my trusty 1964 Concise Oxford dictionary confirms this. I suggest that the intransitive variant "attain to" is perhaps more literary and the transitive form "attain" more everyday.
Can one write 'attain to' instead of attain? Is there a difference? Most civilizations attained to the glory of power before being destroyed. Or something like that. Can someone give an example where it is appropriate?
I would not use it unless I were trying to imitate archaic style for some reason, probably as a joke. As the previous thread indicates, many people would not immediately understand it. If they heard it from a non-native speaker, they would most likely assume it was a mistake.