It's not impossible, but it will be quite an uphill battle. Lenders are extremely cautious right now about giving out loans, and even people who haven't had foreclosures or credit problems are having issues. If you have a good down payment and have rebuilt your credit over the last 3 years, then you might be able to find something.
Fannie Mae and others have new guidelines, and depending on the kind of foreclosure and extenuating circumstances, you may have to wait 5-7 years for a conventional loan (they will go to 3 if you have extenuating circumstances). In comparison, if you had performed a short sale the waiting period is 2 years.
Some of the factors that can count towards when you can get a home loan again is job loss, sickness, spouse death or injured by severe accident.. You may have to have a minimum 680 credit score, and have between a 10% or 20% down payment.