I'm imagining something without an existing orbital trajectory, but instead is very slowly commencing a straight-line trajectory towards the Sun. How long would it take to get there - or would it be compelled into an orbit and perhaps never get there?

I imagine we are talking hundreds of thousands of years so the proper motion of the Sun would be an issue, so I am also assuming there's an appreciable gravity well at one light year out that would not only keep a hold of the object but also accelerate it inwards? The object would be very small (grain of rice say). Thanks