When in the command line, for example when changing directories (:cf INBOX), allow ctrl-j to be used for enter. Similarly, ctrl-u usually deletes the current line.
If you edit your $HOME/.config/aerc/binds.conf file, you should be able to modify these keybindings. Does that solve your problem?
This works well for most cases. I could not get it to work on the command line though. E.g. to terminate/execute a command like:cf INBOXfollowed by ctrl-j instead of pressing enter.