There is a huge gray zone in composition between influence and larceny. All composers work under the influence of the music and musicians and ideas that surround us. We are deeply influenced by our heroes, our teachers, and our colleagues. And even when we try to work things out for ourselves from first principles or the compositional equivalent of reverse engineering, tradition provides an unavoidable and enormous background radiation. If we don't consider this in the evaluation of our work, our players and listeners surely will.
The quote famously attributed to Stravinsky goes: "Good composers borrow. Great composers steal." (Another version of the quote deflates the "good" to "mediocre" without deflating the sentiment of the sentence). It would actually be more to the point if it ran "the great composer knows how to steal and not get punished." The skill is appropriation, taking goods that do not belong to you, and making them so much your own that the community identifies you with them. Appropriation is something fundamentally different from imitation; like most trained musicians I can fess up to the ability to forge a page of music that looks all the world like composer X,Y, or Z, but actually turning that page into interesting music goes several steps beyond forgery.
In a marketplace like that of contemporary music, in which the supply of new work is in perpetual surplus to the demand, establishing an recognized identity within the market becomes an essential survival skill for composers. On the one hand, this identity is about distinctiveness, that which you do which no one else can or will do, but on the other hand, this identity is very much about likeness, establishing relationships to the familiar, new & improved, perhaps, but related enough to known sounds or styles that the possible player or listener has a handle, and you a hook to draw them in, as commissioners, programmers, performers, and listeners.
But often the "likeness" goes too far. When a composer emphasizes their relationship to jazz or rock or some other repertoire, it can come across as an alibi for their own music, a pop veneer for music that is about something fundamentally different from entertainment. (If I read another biographical blurb about a composer whose music "combines the sophistication of modernity with the drive of rock'n'roll", I will do damage to large pieces of office furniture.)
A compositional identity is as much about what you don't do in your music as what you do do in your music. Getting out from under the influence is as hard a part of the apprenticeship and journeyman years as anything, but ultimately more rewarding.
I've played Javanese gamelan, Karawitan, for almost 30 years now, and I remain, cheerfully, an amateur; playing gamelan has become both a refuge and a mirror to my other musical work, a domain in which I'm still learning and far from in control. With the exception of one small piece very long ago, written when I was 18, any influence of Karawitan on my own work has been either very deeply hidden or just a passing nod on the surface of music with substantially different concerns; indeed, the more I know about this music, the more cautious I am about how I use it. Am I under the influence? Yes. Will you notice that influence in my music? Probably not. Recently, in the course of reviewing my ideas about musical time, rhythm, metre, tempo, etc. , I began to go through David Nelson's supurb introduction to the spoken rhythmic solfege of South Indian music (David P. Nelson, Solkattu Manual, Wesleyan Univ. Press 2008). Solkattu is perhaps the most impressive bodies of musicianship techniques in the world, and the elegant structure of the South Indian tala system is close to my own thinking, especially the construction of metres or phrases from smaller units, and then variations based on both subdivision and addition, with a special virtuosity in overlaying patterns which do not immediately come out together. However, my approach to Solkattu, my appropriation, is already irreverent in that I write out the patterns in the notation I know best, I don't use the original terminology or syllables (preferring "one-ee-and-uh" or "paradiddle" to ta-ka-di-mi), and I have only a passing interest in the particular collection of forms associated with the tradition. Whether my appropriation is successful or not remains to be heard, but at the very least, I have absolved my source of any responsibility.