The answer is clear – no. Idioms, such as “it cost an arm and a leg” are informal which means they are not suitable for IELTS writing task 2 academic or general training essays. However, idioms are only one type of idiomatic language. There are other forms more suitable to IELTS writing, for example “the key to this issue” means the solution not a key you can buy in a shop or use in a door. That is an acceptable type of idiomatic language for a high score in IELTS.
Regarding quotes, the examiner will give you a score based on your own level of English language, not the words you remember from another person. While quotes are suitable for academic essays at university, they will not help your band score for IELTS. Instead, use the idea from the quote and write it in your own words.
I would also recommend avoiding proverbs as well. Most proverbs are not appropriate for academic writing. Here’s an example of an inappropriate proverb in writing “all that glitters is not gold”. While the meaning might be perfect for your essay, it would be better to write “people should not be deceived by appearances because they can be deceptive” The latter sentence has a much better variety of appropriate vocabulary for a high score.
Proverbs and quotes are not usually academic and for that reason are better suited to speaking. However, don’t lose your fluency score because you are trying to remember an idiom. You get a high score when you use appropriate, natural language in the right context. So, don’t try to fill your answers with idioms or proverbs. Using quotes is not really suitable for IELTS because they are not your own words.