You should use an appropriate dialect and register. In many situations of English usage, non-standard English is not appropriate. And the IELTS test is intented to examine your knowledge of English for the purpose of study or work. It is a test of fairly formal English.
Writing entirely in Scots will not be acceptable. It has diverged sufficiently from English to be considered a distinct language.
Mixing non-standard spellings, such as "gairden" should be avoided. They will be treated as spelling errors if you are writing in English with occasional words written in the Scots spelling. As you are writing in English, you need to write consistently. Your example is not Standard English, nor standard Scots, it mixes the languages and so is not acceptable.
Particular Scottish words may be acceptable, in a particular context. If you are describing a lake in Scotland it is acceptable to write "the blue waters of the Loch". If you are writing about an experience with a Scottish family, you could talk about the "bairns". However if you are writing a business letter to a London firm you would not ask if there is any provision for "bairns". If a question asks about a "child", your answer should not use "bairn".
In general this matches the use of English by Scottish people, who show a degree of diglossia, the ability to switch between dialects according to the context.
Roughly, if you need to ask if a dialect word is acceptable in a given situation, then it probably isn't. In other words: Ye cannae do it, ken?.