I don't think that'll be as effective, no, unless the freezer itself is extremely cold, ideally with good air circulation.
A freezer ice cube box isn't going to actually be making full contact until it's melted enough to turn into an ice bath anyway. Until then, it'll have some amount of water melting, dripping, and refreezing, and ice in partial contact with the food. In contrast, an ice bath makes full contact with the food immediately, and it has enough liquid to circulate and make sure that there aren't warmer areas near the food.
Also, ice baths are usually used to rapidly chill food, not to freeze it. By the time a freezer manages to fully chill the food, the outer layers are going to be frozen, a pretty undesirable result if you just wanted chilling.
A bit of a side note: "flash" cooling/freezing refers to a method that cools/freezes quite quickly, by circulating extremely cold air across the food. (Sometimes it's also used to refer to the fastest freezing you can get at home, placing very small pieces of food in the freezer.) Putting cooked food in a freezer with ice cubes isn't really in either category.