Sure you can and here is how you do it.
First you heat up some olive oil or whatever oil you prefer on a pan, after the oil is heated up you can put a piece of onion and/or a diced garlic clove to give the beans a better flavor. Simmer them for a few minutes and then take them out. You then put the beans in the pan and let them heat up. When they're warm enough you smash them as if you were making mashed potatoes. Let them heat up a little longer and you have just made yourself re-fried beans. You can also do this with black beans.
Good luck in the kitchen!