Based on the warranty document:
Legal - Mac Warranty Us - Apple
Which states this:
WHAT IS COVERED BY THIS WARRANTY?
Apple Inc. of One Apple Park Way, Cupertino, California 95014, U.S.A. (“Apple”) warrants the Apple-branded hardware product and Apple-branded accessories contained in the original packaging (“Apple Product”) against defects in materials and workmanship when used normally in accordance with Apple's published guidelines for a period of ONE (1) YEAR from the date of original retail purchase by the end-user purchaser ("Warranty Period").
It appears the basic warranty is not transferable. You may need to contact Apple legal to see if this statement really only applies to the original purchaser. However, the statement seems to imply such.
Generally, most electronic device warranties are not transferable.
However, if you have AppleCare+ coverage, it is transferable:
Transfer your AppleCare plan - Apple Support