Yes you can upgrade the account. The process is explained in: How do I upgrade a console or platform account to a full Epic Games account?
https://dev.epicgames.com/community/learning/knowledge-base/xdwWq/epic-online-services-if-a-user-creates-a-headless-account-on-console-is-it-possible-for-them-to-link-to-a-real-account-later-so-they-can-have-access-to-the-cross-platform-friendlist