Yes, seems it was in his dream. The story is up on Wiki.
“After hearing Anita's version, Cash claimed he had a dream where he heard the song accompanied by "Mexican horns". Cash stated, "I'll give you about five or six more months, and if you don't hit with it, I'm gonna record it the way I feel it."[citation needed] Cash noted that adding trumpets was a change to his basic sound.[8]
When the song failed to become a major hit for Anita, Cash recorded it his own way, adding the mariachi-style horns from his dream. This sound was later used in the song "It Ain't Me Babe", which was recorded around the same time. Mother Maybelle and the Carter sisters are prominently featured in the Cash recording singing harmony. Cash tinkered with a few of the original phrases in Anita Carter's version of the song.”