Blockchain.info's wallet is based on the code at https://github.com/blockchain/My-Wallet. (no license is specified that I can see, but it seems apparent that they wish you to have the right to use it to own your keys) But let's take the worst-case view we can regarding this: Blockchain.info is suddenly offline, and their My-Wallet code with all of its forks on github are removed. You have a backup (encrypted or double-encrypted) and you wish to restore it.
pinheadmz has created an open source blockchain.info wallet decryption tool, based on a tool that blockchain.info has temporarily removed.
I have downloaded the existing Import Wallet page and tweaked it to dump the private keys in an alert
window. This works with all of the encryption schemes that blockchain.info currently supports. It's quite unpolished, but does the job. It outputs each private key in the format in the backup (usually base58, which is somewhat unusual) and hex. You can download it at this link.
To ensure that you can easily make use of the above output, you might also want to have an offline copy of the (open source, public domain) Brainwallet site, which I've made a copy of here.
You and I are hardly the only ones to think of such things. This thread offers some good tips on using your Blockchain private keys offline (e.g. enable the option for automatic backups to be emailed to you when your wallet changes). I think it's quite safe to say that (as long as you have a good backup and know the password(s)), with a little help from the Bitcoin community, you will always be able to recover your Blockchain.info private keys for use elsewhere.