Is it possible to get a kidney infection in the midst of being treated for a uti?

Yes. Yes, especially if you are on the wrong antibiotics. Do you have a high fever? Kidney infections almost always are associated with a high fever.
Yes it is. Bacteria responsible for UTI could be resistant to the antibiotic prescribed, or have become resistant so the infection is still present and travels up to the kidney. Best to get a urine culture with sensitivities. Discuss with your dr.