First, let's do a quick assessment to see if your ankles are really the problem. Keeping your heel on the ground drive the knee forward and use a wall or other straight object as a reference point. You should have about 4" or more distance between the front of your knee and the front of your toe. Any less, and you could be missing some valuable range as well as the ability to maintain an upright torso in the squat.
Here are few great options to do PRE workout to improve your positions. Grab a band and attach it to a rig or something else that won't move. Thread the band around your ankle, step back to put some tension on the band and bring your opposite knee to the ground. Drive your knee forward while keeping your heel on the floor. Feel free to freestyle and drive the knee to the sides as well... wherever you feel the most stretch. You can also face away from the band or even sideways to gap the joint, wherever you feel the most limitation.
Another great option is to use a plate to do some active mobilization. Make sure to drive your heel straight toward the floor. 15-20 reps is good.
POST workout, make it a priority to help your tissues recover and get them sliding over themselves a little better improve your positions in future workouts.
Start with the feet. Hit the arches and the base of the heel. You can even splay your toes out and hit the balls of your feet.
Next, hit the classic calf smash. Use a kettlebell or a barbell that's propped up. A lacrosse ball works too but not as easy to position and keep in position. Point your toes toward your face and point away for reps (flossing). You can also rock the calf side to side (pressure wave). I combination of the two is good too.
Finally, hit the muscle on the front of your leg next to your shin. This is a piece of tissue that gets neglected a ton. Remember that your muscles support each other on opposite sides. Mobilize your calves and your anterior tib together because they work together. Limitation or inhibition on one side can cause issues on the other side.