Hi, Welcome to eHealth forum!
Usually conditions of heart, kidney, liver or low protein or severe anemia, which cause ankle and leg swelling cause both ankles to swell. Hence if both ankles are swelling then you will need to get heart function assessed by ECHO and EKG, get kidney and liver function tests done and get a complete blood picture for anemia.
Low sodium in blood, hypothyroidism and malabsorption syndromes causing low protein in blood have to be looked into.
Since a confirmed diagnosis cannot be given on net please discuss these possibilities with your gynecologist and treating physician once. Please do so ASAP. Hope this helps. Take care!