If your console is designated as your friend's home console then you can use your own account and get his gold benefits. If he has another xbox one console set as his home console then you can't use his gold benefits.
Madre de Dios, es El Pollo Diablo! http://www.youtube.com/watch?v=E28WrhpTzQA
Does it matter if I set his account as the home console? Or would I lose any benefits?
You won't be able to play any of your digital games offline.
Edit: Whoops, sorry, misread the initial post and didn't see that this is a scenario where you have two accounts on the console. If your friend sets your console as his primary account, then you would get gold subscriptions privileges for free.
The only downside is that since your console is now the "primary console" for your friend, he won't be able to play his games offline since the console he has in his home is no longer set as his primary. No downside for you though, assuming you also have the used console set as your primary.