Several Team USA hoops stars made a bonehead move in a foreign land -- thinking they were walking into a spa that turned out to be a whorehouse.

DeAndre Jordan, DeMarcus "Boogie" Cousins, DeMar Derozan and possibly 3 other players went out on the town Wednesday night in Rio and strolled into Termas Monte Carlo ... which Rolling Stone called "one of the high end brothels in Rio."

When you call the place, they'll tell you it's a spa that plays music ... and it's just for male customers. Oh, and they have a full bar.

A source close to the team tells us the players got the standard line, so they assumed it was kosher. The source said, "They realized it wasn't the right place for them and immediately left."

As for what happened inside, the players were only seen hanging at the bar. Multiple sources tell us they bought booze ... nothing more.