The first one doesn’t really make sense in my opinion. この傘を貸しませんか on its own would most likely mean “Can you lend me this umbrella”. Given the first sentence 傘がないの? that asks if the other person doesn’t have an umbrella, この傘を貸しませんか can technically mean “can I lend you this umbrella”, but that is still awkward.
The second one makes a lot more sense. この傘を貸しましょうか is “shall I lend you this umbrella”. ましょうか can definitely be a proposal to do something together (“let’s”; “shall we”), but importantly it doesn’t have to have a “we” in the meaning. It can be used as “shall I” like in this case.
Either way, if you’re offering to lend someone an umbrella, I think この傘を借りていいですよ (saying “it’s okay to borrow this umbrella”) would be more natural. (And if you wanted to borrow the umbrella yourself I still think 借りる for “borrow” would be better than 貸す for “lend”.)
One more thing to note is that you have to be careful to not mix politeness levels. 傘がないの is casual but then この傘を貸しませんか and この傘を貸しましょうか are polite.
By the way, there’s a whole topic on WaniKani for asking short grammar questions, so definitely free to ask more.