This is a tough question to answer generally, because I think it all depends on exactly where the cavity is, how large it is, etc. For example a small cavity that is not directly next to the inlay may be fixable. However, if the cavity undermines the inlay in anyway, then the inlay will probably need to be removed.
The only way to be certain about what needs to be done is to make a visit to your dentist. They can examine the cavity and may perform x-rays to get a better sense of the health of the tooth beneath the inlay. This information will allow them to answer your question directly.
One thing that is for certain is that you should not delay your trip to the dentist! Cavities, if they are not fixed, tend to enlarge slowly over time. If the cavity does not undermine the inlay now, it may do so in the future if you wait without repairing it. The longer you wait, the more likely that the repair will be more difficult and more costly.
Contact your dentist's office today to make an appointment!