At least seven ministers, including its health minister, have also tested positive and were either undergoing treatment or recuperating at home.
Anez said in a tweet she was “well” and continuing to work while in isolation. “Together, we will come out of this,” she said.
She said she took a test after many of her team fell ill.
“I feel well, I feel strong, I am going to keep working remotely from my isolation, and I want to thank all the Bolivians who are working to help us in this health crisis,” she said.
Bolivia is due to hold general elections on Sept. 6. The elections were originally planned for May but delayed due to the pandemic.
Political turmoil gripped the country last October when a disputed election led to widespread protests that eventually toppled longtime leftist leader Evo Morales.
Anez, a conservative former senator, assumed the interim president role in the political vacuum and initially said she would not run for full office, but later threw her hat in the ring.
Rival candidate and former President Jorge Tuto Quiroga, who is running again, said it was “indispensable” for Anez to be in full health and working towards the democratic transition.
Other leaders around the world also have contracted the virus.
British Prime Minister Boris Johnson, 55, spent three days in intensive care sick with COVID-19, the respiratory disease caused by the novel coronavirus, while Brazilian President Jair Bolsonaro confirmed on Wednesday he had tested positive.
Bolivia, a landlocked Andean nation of over 11.5 million people has registered more than 42,000 confirmed cases of the disease and 1,500 deaths.
It is one of the worst affected countries per capita in the world.