You have taken code licensed under MIT, and with another person (let's call her Charlie) produced a derivative work which you normally distribute under AGPL. You wish to give Charlie the right to use this in a closed-source product.
Yes, you can do this. You cannot free Charlie (or yourself) from the obligations of the MIT licence, but that licence is no bar to Charlie's use of the code in a proprietary product. The simplest way is probably to give Charlie a copy of the entire work under the MIT licence (though you and Charlie between you can license your rights on any terms you like).
However, if you do this there is a risk that Charlie will redistribute the work under the MIT licence, thus producing a publicly-available copy of the work that doesn't come with the AGPL obligations that copies obtained from you generally do. This might be avoided if you were to give Charlie a copy under MIT (for the original rights) and some mutually-agreeable proprietary licence that permitted redistribution but only in binary form (for your rights). Such a licence, however, would be non-free, and thus off-topic for this site.