Actually, neither foot needs to be in play. He could have, for example, been airborn.
However, if one or both feet were grounded inside the dugout--out of play--it's not a legal catch. Same for any out of play area. An outfielder, for example, cab leap at the wall and make a catch over the wall. However, he can't plant a body part (hand, foot) out of play and then make the catch.
In this case I think it was a legal catch.