No, that should not be a problem. Just drag them from your local mail folder and drop them into the imap folder you want copy them to, or use right-click and move-to.
You'd first have to configure imap access to the target account (not necessarily the same account the email was originally sent to) then you can move your local email to the INBOX that is listed under that account - or (maybe preferably) you could create a new imap folder under the imap account (let's call it "Archive") and move your email to that new "Archive" folder on the imap server.
I don't know how Thunderbird would handle having both an imap account and a pop account both pointing to the same actual email account. I'm not saying that's what you're thinking of doing, but it sounds undesireable to me. (That might be another superuser question if that's what you want to do.)
The dates (and all data, including attachments) should be preserved, but I'd suggest starting with one or two emails just to be sure it does what you expect. This is definitely the type of thing you'll want to experiment with for yourself before you try to move large amounts of email.