New bottom bracket and crankset - what spindle length? I have a bike that I'm doing up as a project and I need to replace the bottom bracket (old-school square taper). Since the front chainring (single, 46 teeth, riveted) is pretty badly worn I was going to take the opportunity and replace that as well. But what to get as replacement?

At the back I've got a 6-speed freewheel with a chain line of 38 mm. The bike is nothing special, it's more for fun and the learning experience (my first project..), so I'd like to keep the costs down. I was looking at some budget cranksets on ebay but most of them don't specify what kind of bottom bracket length to use. How do I find a crankset/bottom bracket combination that will work and also give me a narrow enough chain line? Is it just a matter of trial and error (that could get quite expensive if I'm unlucky I guess..) or is there something I should look out for?

I found a cheap one that for a change specified BB and chain line: 131 mm BB and 50 mm chain line. 
https://www.rosebikes.com/article/m-wave-single-crankset/aid:485066
Can I just use a shorter BB to get a narrower chain line or will that not fit? Do you know of a combination that could work?

Thanks a lot!
Chainline is important, more so for modern 10+ speed systems. A six speed system is more forgiving of misalignment than one would guess. Since both BB are square taper all you need to do is remove it and see what the size is on the BB itself. The shaft will only allow a crank on so far (that's why its taper). By buying the size currently in the bike you should come pretty close. You'll see plenty of cross chaining with modern bikes and they survive. Although not the same exactly, I think you'd be OK as well.

(Not so cheap but) Simple Solution:
Why not just replace the chainring if it is that worn? Much easier to do, and much cheaper. Also, if your chainring is in that bad of shape it is likely your freewheel is damaged too, as is the chain. You'd be better served by replacing the drivetrain entirely. Removing freewheels are not as easy as hubs, but it can be done. You'll have the ride you wanted without the compromised components causing mischief and making you think it is a chainline issue.

Good Luck!