Yes you can tour a home when it is in contract. Deals do sometimes fall apart. If this is a bank owned home-there are no home sale contingencies allowed. If it is a traditional listing (not REO) and is contingent on the sale of a home it will be disclosed in the MLS. Your agent should be able to find out this info. There is normally an escape clause for the seller if another buyer with no sale contingency makes an offer.
Ask your agent to see the property-I am sure the seller will oblige. If you like it, you can put in a back up offer so you can pick up where the buyer left off if they decide to terminate the agreement.
A good number of foreclosures come back onto the market after inspections. Buyers get scared when they see all the work that needs to be done. Homes do not hold up well in our area when left vacant for long periods of time. (moldy wet basements due to no electric to the sump pump, flooded HVAC systems, pipes burst, roof leaks that were never repaired, etc.)