I’ve never read the T& C on my discount codes (usually for late flights), but I’m certain I’ve booked using them for either of my kids without necessarily matching code to traveler.
Then again, we all have the same last name and I do manage the log in for each kid, even the college student who is now over 18. Is usually log in to the account owning the code, then book for whomever. It actually never crossed my mind it wouldn’t be okay to book a sibling’s ticket with a code.