I am on an L1b visa in the US with a foreign passport. It was machine washed, everything is readable, a little washing appearing on the visa. I don't have a US ID and I need to travel to the embassy in the US to get a new passport. Will the passport be okay to use for this trip?
I did something very similar to my (Canadian) passport. Like you, everything was readable including (importantly) the machine readable parts. I was allowed back into my country, and in fact continued using it for several years ( including to the US), although several times those checking it recommended I get a new one. When I finally did come to replace it I was told it was a damaged passport and couldn't be simply renewed, and should have been replaced.
So yes, you would probably be let into the US, and your passport should be usable as ID, but you should take steps to replace it as soon as reasonably possible. You should look into getting an alternate photo id for while your passport is being replaced.