Found the official ruling. You can flip over the wall into the bull pen or stands like the example above., but when you secure the catch one or both feet have to be over the field of play.
\Rule 5.09(a)(1) Comment (Rule 6.05(a ) Comment): A fielder may reach into, but not step into, a dugout to make a catch, and if he holds the ball, the catch shall be allowed. A fielder, in order to make a catch must have one or both feet on or over the playing surface (including the lip of the dugout) and neither foot on the ground inside the dugout or in any other out-of-play area. Ball is in play, unless the fielder, after making a legal catch, steps or falls into a dugout or other out-of-play area, in which case the ball is dead. Status of runners shall be as described in Rule 5.06(b)(3)(C) Comment (Rule 7.04(c) Comment).