Yes. In fact, refried beans are what you would traditionally find in huevos rancheros. I like to use black beans only as a personal preference.