You likely refer to the Received field in the mail header, i.e. something like this:
Received: from e239-39.smtp-out.eu-west-1.amazonses.com ([22.214.171.124]) by
mx-ha.gmx.net (mxgmx016 [126.96.36.199]) with ESMTPS
Each mail server on the path of the mail adds such a Received field on top of the mail header. The IP address in this line is determined by the mail server from the TCP connection. It can not be faked by the sender, since IP spoofing in a multi-exchange TCP connection (as used in mail delivery) is not possible.
But, it is possible that the attacker simply adds their own Received fields into the mail before it gets delivered, which can contain any content defined by the attacker, including your IP address. These additional Received fields are usually simply passed through to the recipient. Since it is common that a mail contains multiple Received fields this can be used to confuse the target since it can be unclear which of these Received fields are actually added by a real mail server and which are faked.