Given your time frame I will agree that splitting the time between BKK and Chiang Mai makes sense.
You are in luck with regard to being there for Loy Krathong. You might want to consider going to Sukhothai instead of CM. The whole LK pageantry in Sukhothai is very cool. And there are some national parks nearby as well that are worth a visit if you're into nature stuff. But I think LK in CM is supposed to be pretty nice as well so I don't think you'd go wrong there either.
As for walking around, I think CM is much better for that than BKK. I've been to BKK many times but have never really gotten a feel for the city by walking around like you can do in Europe. But the public transport and taxi infrastructure in BKK is quite good.
You don't say where you're coming from. But don't discount the jetlag. There are lots of flights per day between CNX and BKK so flying back right before your international flight should be easily done. I'm not sure there's ideal answer. But since you arrive so early on the 20th I would consider flying to CNX right away since you'll be at the airport anyway and then returning to BKK a few days before your return. But it's probably 6 of one, half dozen of the other.
The good thing about Thailand is that there are lots of local hotels that are a very good standard at reasonable prices. Particularly in CM you can find many "authentic" Lanna style places. Most places in BKK will have some local touches in the decor even in the big chains. I would base my choice primarily on the location you want.