What type of paint should I use to paint a block foundation wall?
There is very little difference between interior latex and exterior latex enamels, the primary difference in exterior enamels is probably in some additional chemicals to help resist moisture as well as resist cracking and flaking due to extreme changes in temperature.

Moisture issues aside, concrete blocks will contract and expand greatly with temperature differences and an exterior latex paint is appropriate to withstand this without cracking.

To prevent peeling and flaking however you need a good surface for the paint to bond to, so I recommend using a wire bristle brush or a rotary tool with a paint scraping attachment to completely remove all areas where paint is peeling or flaking.  Areas that are not peeling or flaking should be "roughed up" with your tool as well so that the new paint has a good surface to adhere to.