What's the best way to share and edit documents between iPhones with separate Apple IDs?
Short answer: Dropbox (preferably with Dropbox-aware apps).

Longer answer: It depends a lot on what type the documents are, and what apps you use to edit them.

Anything that only has iCloud as a sharing mechanism won't work, without exporting via email or some other means (which would seem to defeat the point). For the foreseeable future, iCloud documents are tied to individual accounts.

Dropbox is probably your best bet - either a shared account, or shared folders between individual accounts. The app itself can open files in whatever application supports them, but then you're dealing with multiple versions again. If at all possible, use apps that have built-in Dropbox support to avoid this.

If you're dealing with plain text, there is a vast selection of Dropbox-enabled text editors out there. Brett Terpstra has a heavily detailed comparison here.

For other formats, it may be a bit more hit and miss. For Office documents, Office2 HD and Documents to Go both advertise Dropbox sync, but there may be more out there.

For PDFs, PDFPen does Dropbox sharing, and is a great app. PDF Expert has similar functionality.

If you narrow down what sort of document support you need, I'm sure others can chime in with suggestions.