Since you have a history of kidney stones, so this flank pain can be due to kidney stones only. Patients with urinary calculi may report pain, infection, or hematuria. I suggest you to get an ultrasound or CT kidney urinary bladder done. Moreover it can cause further complications. My sincere advice would be to consult a urologist.
I hope it helps. Take care and regards.