You can certainly buy a home. The real question is - can you get financing, and if so, what are the terms.
From your question it seems you are nearly three years out from the foreclosure, so come September all the government loans are an option: FHA, VA, USDA/Rural Development. Further, since you have not had an ownership interest in a principle residence in the past three years, you will be eligible for first time buyer loans like the MN Housing loans, or City Living, with their lower interest rates and maybe even down payment assistance, assuming you meet the program guidelines.
Finally, if this is a "wrongful foreclosure", it may be possible to have it removed from your credit history. Maybe. In which case you could also look at conventional financing.
I would be happy to take a closer look at your situation and let you know what we can finance for you.