As this is rather Office365 question I'm not sure if we are able to help.
Have you tried logging as it was a completely separate account:
imap.UseBestLogin("sub-main@example.com", "password");
Are you sure this is not an email alias? I wasn't able to find any documentation on sub accounts in Office 365.
If that is a case, you can log in using your standard credentials and then perform search on To and Cc headers:
imap.UseBestLogin("main@example.com", "password");
List<long> uids = imap.Search()
.Where(Expression.Or(
Expression.To("sub-main@example.com"),
Expression.Cc("sub-main@example.com")));
[Edit]
It seems you can do this using shared mailbox syntax:
imap.Login(
"Username@DomainName\\SharedMailboxAlias",
"password");
More details can be found here:
https://www.limilabs.com/blog/access-shared-delegate-mailbox-exchange-server