I agree completely with JAM's answer.
However, there is one fundamental misunderstanding I see in your question: You are attempting to apply the standard rules of English grammar to a dialect which does not necessarily abide by all of them.
Supposedly this song was transcribed by John Jacob Niles from a song sung by the daughter of an itinerant preacher in the extreme western part of North Carolina in 1933. Assuming the preacher in question mostly stuck to his dialect area, this would make the original author a speaker of Appalachian English
This is probably the lowest prestige English dialect found in the USA. About the only place you will find it in popular media is in Bluegrass music. Many English speakers have severe trouble understanding it in spoken form. So if you go looking through an AE song for "wrong" usages of English, you are likely to find yourself in a target-rich environment.
That being said, I can't find anything about unusual uses of "I" as a direct object in that dialect (in fact, I think AE is more likely to unexpectedly substitute "me" for "I", rather than the other way around). Most likely, as JAM said, this was just done to make that one line rhyme.