A friend of mine was chased away by a ghost or something similar in a local abandoned town. I am planning on visiting the site, and would personally appreciate being able to chase it away. Call it part of my code of honor. If anyone has any suggestions on how this could be done, I'd be sure to let you know how it turns out.
The entity may not have power over you, but you have not been granted regency of that space. At least I'm willing to bet as much. As such, you have no authority there over anything or anyone but yourself.
When I hear 'code of honor' in this context, I think what people usually mean is some sort of revenge. Often as a mark of pride rather than for a sense of justice. Or pride in having something to 'beat' and puff ones self up.
Red flag: you are already thinking you will succeed in chasing this being away, as if you have already succeeded. Yet you have no training, experience, or knowledge on how to do so. If you did, then you wouldn't be asking.
Another red flag; you are going to that place specifically to start a fight- not to be prepared to protect yourself from one. On the home turf of an entity you don't know, who likely belongs as a part of that places history, and who for all we know (and possibly you as well) your friend antagonized into what happened to begin with.
Third red flag; You are operating under an idea of the success of force, looking for someone to hand you a tool. Say a few words, throw a cloudy potion, and the ghostie is kicked away to the aether. Having a sword does little good if you don't know how to swing it. It just makes you likely to hurt yourself instead.
I might be sounding a bit harsh here, but this is important stuff. Think of it this way; you are acting like someone who just watched a martial arts movie, and now you want a black-belt to tell you... not even teach, but tell you, a move you can do so you can go to the bar and try it on someone.
In life, people are called to many things. A warrior path being one of them. But a significant part of walking such a path is learning what it means to be a warrior. Same as a protector. A guide. A healer. It comes with many mistakes, misunderstandings, and wrong turns that lead to entire resets of one's understandings. If there is anything I have learned though, is that many can be avoided by reflecting on that inner 'why'. And so that is what I really recommend before you begin this endeavor.
Ask yourself why you are actually wanting to go pick a fight. And reflect on the actual possibility of success. Also the possible consequences. Not only of 'winning' but also 'losing'. What do you stand to genuinely gain? What does your friend gain? Does it help you or your friend grow as a person and become better?
Code of honour I get, but from what you described, your friend went to a spirit's home and was scared off by the spirit. Now, you're hoping to go back to the spirit's home and get revenge when it was your friend who was bothering the spirit.
Most spirits are nice. Most spirits keep to themselves. Let's pretend this spirit was a living person. Your friend broke into their house and the owner chased your friend off their property. The spirit didn't invade your friend's house, your friend invited the spirits.
If you are insistent and will go to this spirit's home, I would protect yourself. Wear a protection symbol, shield, and bring some blessed salt just in case. As for how to get rid of the spirit, that I will not tell you.
Another option of what this could be is a fae, house wight, the energy of a past event, or any other being that is a part of nature. If you aren't certain this is a spirit haunting a house, I would not attack them because they could be something far more powerful and you could get in a lot of trouble.
I pretty much agree to all of the above, how would you like it if a stranger just walked in your house, you scared them off, and then a second stranger comes in your house trying to get you to leave your house because you made the first unwelcome guest leave. Doesn't sound very fun, right?
Ok, I completely agree with everyone the only thing I will say bluntly with positive energy so hopefully you will not only hear but feel.
You will get your butt handed to you walking into something like this. Your friend was wrong and probably needs to go give a peace offering and move on.
Being a warrior myself that "Code" should not be tampered with negativity.
Knowledge is the best weapon.