you can do that and you most likely won't throw a code. unless your car needs to be tested every year, you'll be alright. you'll get a decent amount of power by putting jsut a straight pipe in its place, but it will probably sound like crap...which people have already proven by using a straight pipe in place of the resonator.
IMO you should replace it with a resonator, then have another resonator before the muffler.