Yes, but you can not use the referral code you just got now for ordering a tesla to get any benefit for your current order.
People that "referred themselves" have referral codes from previously delivered tesla products. So if you have ordered (and had delivered) some other tesla product previously, you already would have a referral code and could self refer yourself.
if you just got a referral code (as the OP in this thread was talking about), you didnt have one before you ordered, and tesla will not go back and retroactively add your own referral code to your own order when you have not taken delivery of any tesla products at all yet.
TL ; DR, your referral code is active to refer others if you havent taken delivery yet, but you cant self refer yourself unless you have taken delivery of some tesla product or other (cars) or, alternatively, have ordered something through tesla energy.