DIRECTIVE 2008/115/EC on common standards and procedures in Member States for returning illegally staying third-country nationals stays on guard to protect citizens with EU citizenship, in my opinion, without prejudice to other Council of Europe or international regulations concerning the protection of human rights - it only details the practice of treating all third-country nationals who do not or who no longer fulfil the conditions for entry, stay or residence in a Member State. In my opinion it also relates to refugees denied international protection.
I think that Council Directive 2004/83/EC of 29 April 2004 on minimum standards for the qualification and status of third-country nationals and stateless persons as refugees or as persons who otherwise need international protection and the content of the protection granted - will be helpful :)
The Directive says it applies 'without prejudice' to the qualification Directive. It is not clear what exactly that means and the qualification Directive does not mention entry bans. There is no CJEU case law on this point yet. The case law does say that the Returns Directive doesn't apply to asylum seekers, and it must follow that it doesn't apply to those who have protection in that Member State, since it only applies to third-country nationals whose status is not legal, whereas the qualification Directive gives people in need of protection the right to a residence permit. In my view the best interpretation is that the mere existence of an entry ban should not affect the assessment of an application for refugee status, because Article 31 of the Geneva Convention says that in principle refugees cannot be subject to penalties for irregular entry. The same provision of the Convention arguably means that if a person shows a genuine protection need, they cannot be subject to an entry ban and any ban which was imposed has to be repealed.