Unfortunately, the answer is yes, ants can bite through clothes. In fact, cotton actually attracts ants. Beyond their natural attraction to cloth, ants use it to make their nests. Depending on where you live, the ants in your vicinity might have an appetite for clothing. However, this does not apply to all ants.
When dealing with ants and fabric, it is important to remember that ants love the smell of fabric and will follow the scent just like they follow the scent of food. This is why it is important to be vigilant after hikes or long periods in nature and check your clothes for ants.
Ants are also repelled by permethrin, so wearing permethrin-treated clothes is a good option to help avoid bites.