Yes. Run a packet sniffer on your computer and inspect the destination address of the Yahoo packets. You can do this as well on any gateway that your connection passes through. Yahoo does not provide any means of doing this. You may, however, end up with the IP address of a Yahoo server instead of the person you are speaking with, depending on the state of their protocols at the time.
QUESTION: IS THERE ANY OTHER WAY TO KNOW THE IP ADDRESS OF THE PERSON WE ARE CHATTING WITH IN YAHOO? OTHER THAN "NETSTAT"