By transferring music from the phone to the macbook, you should still have copies in the phone;
be sure to make a duplicate copy of the iTunes library on an external archive device or hard drive
from the computer. An AirPort base station with attached storage drive may be able to save files
from either, but you'd have to read the Apple Support technical articles about this topic.
http://www.apple.com/support/macbasics/
http://www.apple.com/support/itunes/
http://www.apple.com/support/iphone/
http://www.apple.com/support/osx/mountainlion/
You should be able to sync locally without iCloud (that feature went away after Mt Lion 10.8.5)
by wire, according to several articles from back in the day mavericks was new. Since 10.9 is
not available any more, and Yosemite has been a mixed bag for some (and it's more like iOS
than OS X) I suggest you do more research, as I would have to, in order to attempt to advise.
The version of iTunes in OS X (and iOS) will play an important role in syncing or moving files
or sharing content; and this should be researched to see where your version is now; as it
may be wise to check into Apple Support database on all these factors.
The larger issue would be to avoid upgrading your iPhone since it would be unable to sync with
the computer's older Mountain Lion OS X 10.8.5. (The last step of Mt Lion is a combo update
to the 10.8.5 last step, and is recommended for the computer OS X.) A later iOS for the Phone
and other iDevice, is not advised since there are limits to their being able to communicate when
of different series, with OS X; since you generally cannot revert to an older iOS for iPhone, etc.
And the iTunes sync, is another one of those integrations to be aware of, when changes occur.
Past Mt Lion 10.8.5, & local sync is broken; even if you had a Mavericks installer, offline to use.
At this point, I'm not sure if I should advise you on details here since I'm not in a position to do
a lot of research (time crunch) to be sure it would be sound. And haven't the depth of experience
to feel comfortable in suggesting what may not be adequate for your purposes.
Hopefully at this late time, someone will see your thread and offer advice based on having gone
through similar steps, with more experience, than I have at this time. Sorry to not be of more help.
Good luck! đ