It is not known if the decision problem for ECDLP is in NP, in fact it's likely not in NP.
NP-hard does not mean NP, it means a problem that is ATLEAST as hard as NP. NP-hard problems that are in NP are known as NP-Complete.
Finally ECDLP itself is not a decision problem, so even if the decision problem for ECDLP is in NP and P = NP, that does not mean that ECDLP itself has a polynomial time solution.
NP, NP-Complete, NP-Hard etc... only refer to decision problems, not to general purpose computations.