It's still not legal since you are not even supposed to travel to Cuba by yourself on independent travel. You are only allowed to travel with a Cuba travel organization that has an official license from the U.S. State Department. And traveling with those binds you to their schedule, too, which I guess you do not want to take.
So who pays for the hotel does not make a difference, because you are not even supposed to be there. If you get caught or not is a different matter, but it's still a violation of the embargo.
Specifics WHY you are not allowed to travel in general
There is a government document from the treasury outlining who is allowed to travel to cuba. The document also outlines the issue of spending money in detail. I summarize the general points about who can travel to keep it short:
- Persons visiting “close relatives”, be it Cuban or US persons working in Cuba legally
- Officials on official business, Professionals doing their job or going to meetings
- Faculty, staff and students on specific research
- Religious and telecom organization members & staff
- Agriculture & Medicine related workers
- People with a specific license from the government
Assuming that you are neither of this, you are NOT allowed to travel. The loophole is point 6, being someone who has a license. While you do not have a license, there is a sub-point 2) that gives licenses of the people-to-people program organizers which in return allows their customers to travel along with the program. This means that your only chance to travel legally to Cuba is through this program.
More sources that specially pick up the issue with Jay-Z and beyonce:
- huffington post
- mental floss