I have googled for this many times and the only thing I've found is a piece of (expensive) hardware that hooks into the iPhone charge socket (Apple use them in their stores so you might be able to get some better info if you chat to one of their guys)
Most of the apps focus on barcode product/pricerecognition or QR codes and then diverting the output to a website to check prices or decode the details in the 3d bar. What you (we) need is a core app that will activate the camera/scanning software whenever we tap into an editable text field .... Doesn't exist I'm afraid - or at least I've not found one.
Would be a great (paid for?) bolt on to AwareIM though support 🙂 (or anyone out there developing iOS apps)