Shooting in the same direction doesn't mean fighting together. Military folks tend to be pragmatic, so if it came down to a larger US military effort, I could see some behind the scenes communication and coordination, but wouldn't expect any public acknowledgment of cooperation or soldiers from both sides shoulder to shoulder.
In some future I could see this happening. The Iranian people are generally moderate and have a decent opinion of America. It is their leadership that can be a bit extreme. Of course, we'd have to stop listening to the ridiculous fear-mongering and propaganda we are fed about them as well, but it could happen eventually.