The protein was in inclusion bodies and I solubilized it in 8M urea. I employed dialysis to remove urea and to refold the protein. Unfortunately, it formed aggregates.
Try including arginine in the refolding buffer. It often helps. There will probably always be some aggregation. You can remove it by gel filtration chromatography.
An integral membrane protein might be much more difficult to refold in solution than a peripheral membrane protein due to the extent of interactions with the lipid. In addition to Adam B Shapiro suggestion you could also consider the addition of some non-ionic detergents such as Tween.
Try to solubilize using nanodiscs in place of urea...High order structure probably remains and you won't need to refold for recovering the activity of the membrane protein.