Both roles are leadership roles, and the skill-sets required for one often overlap with the skill-sets required for the other. This means that, even in ideal situations where the roles are clearly defined and responsibilities are divided neatly, there can and there often will be conflict.
In the ideal situation, the manager/leader is in charge of a team of people who are specialized at their work, and are each much more talented at their own work than at the management role, and vice versa. A good manager will be in charge of managing people who are much smarter than he is.
In case of conflict, the best solution is to redirect the conflict into a mentor-student arrangement. If, for example, you find yourself in a PM role, and have more technical skills than one or more of your team-mates, rather than doing their work for them, or becoming a technical resource, try to become a mentor and leader. If you absolutely must spend time dedicated to helping one or more of the team-members out, put very strong boundaries on it. For example, maybe dedicate one or two hours a week to a pre-scheduled help/Q&A session, maybe describing it as a one-on-one. Remember that, if they are to learn, you should allow them the freedom to make mistakes, and then correct the mistakes themselves.
Vice-versa, when you find that one of your technical resources is trying to take on some of the PM work, possibly by force, treat the situation as a chance for you to increase your own skill-set. Accept that, most likely, the team-member is seeing something which is not working properly, and believes that s/he can compensate or improve the situation by taking on more work. Take time to look at what they are trying to do, and to learn which problem they are trying to solve, and attempt to form a mentor-student type relationship where they are advising you on the work you are trying to do, but are not themselves doing it. Make sure to make it clear that this is an advisory position - where you will take extra time to listen and learn from their advice, and then decide which course of action to take based on your own skills and merits. If necessary, point out that you have more information on the situation, most likely, than they do, and that you'll need the freedom to make and correct your own mistakes.