Apparently "along" was only added to the expression later. The Oxford English Dictionary lists the following quotes without along:
Lily would like to go to the court-house this forenoon, just for the ride, you know, and I think the air and exercise will do her good.
Large open sleighs drawn by four and sometimes six horses were resorted to, and many individuals and parties enjoyed these for the ride alone.
Reminiscences of an Octogenarian of the City of New York, 1896
The earliest quote they have for along for the ride is 1951:
I only went along for the ride, and to see what else Neal was going to do.
On the road
However, searching Google Books brings earlier quotes such as the following quote from 1933:
Who? Me, doc? You can't kill me. Anyway, I just went along for the ride.