You sure can! It may be a bit more difficult to find a place that will rent to you than it otherwise would be, but be patient. Depending on the rental agency, you may be required to pay a higher security deposit or even be required to have a co-signer. It really depends on the rental agency.
Generally speaking, bankruptcy will not stop an eviction. In 2005, the bankruptcy laws were changed under the Bankruptcy Abuse Prevention Consumer Protection Act. This act prevents bankruptcy from stopping evictions on rental properties, which are properties that are being leased. In other words, if you are facing an eviction from an apartment or rental property bankruptcy cannot stop that eviction process. However, bankruptcy may still be an option for you to consider. Depending upon your landlord, they may come after you for the past due rent. They could sue you and get a judgment against you on the amount past due. Filing for bankruptcy will wipe out the amount owed to your landlord and stop them from getting the judgment or wipe out the judgment if they had already obtained it.
What if you have a house that is facing a foreclosure though? If you have been given a notice of sale or foreclosure on your home, then bankruptcy may be an option to consider. Here is more information on how bankruptcy can stop the foreclosure of a home. Be sure to contact an attorney as soon as possible to explore your different options.