What do you play as a guitarist on a song that doesn't have guitars in the original recording, if you're playing with a band and the parts from the original recording are already played by someone else?
There's no hard & fast rule. Options include...
Work with one of the other players to 'share' a part; whether by 'time' or by 'part within the arrangement'.
Make something up that works even though it wasn't in the original.
Sit this one out.
The longer a band plays together or the better the players, the easier it is to make 1. work.
Anecdotally; I worked with a couple of guitarists who would only need one run-through to figure out what each of them would be doing. They never discussed it, they just felt it through & stayed out of each other's way. The keyboard player was similar. Between them, they worked every part of the arrangement out without doubling or clashing, or even speaking about it. It was a wonder to behold sometimes.
I was drums/vox & musical director for that band - I never had such an easy time of it ;)
You and your band mates are in a great position to explore the art of arranging songs.
The approach depends on the goal of the band. Are you trying to play a cover exactly as recorded, or develop a new and unique version of the tune? An example may be a bluegrass version of the dance hit "What is Love (Baby Don't Hurt Me...)". If this is the case the only real "rule" if you can call it that is support the song. Everyone needs to be on the same page with sound, key, tone, style. It can be tough for two strong rhythm section players to complement each other. In a jazz orchestra the guitar and piano can both comp chord progressions and that is the most likely situation to cause clashing if the players aren't reading each other. Without knowing a specific song I'd guess there is a keyboard playing chords. If you have a keyboard in the band get the chords and work out some complementary way to play the same changes. The simplest choice would be to double the same chords and rhythm as the keyboard is playing but that isn't really interesting. Back in the 80s keyboards would appear in a small percentage of Metal songs and we had a keyboard player in our band who would sit out until he was needed. So, in some cases, not playing is an option.