Can Apple refuse service under warranty if an iPhone presents only some scratches?
I have had some personal experience with this type of warranty problem. I had an iPhone 3GS which had stress cracks in the white case. I left the phone in my pocket the day before my genius appointment, and hey presto it went in the washing machnie.

It came out dead! I took it in, told the gyt what had happened, he took one look at the cracks, and replaced the unit.

Legaly with warranties - if there was a problem with the product at the time of purchase you are able to take a refund without any quibble.

Going back to your specfic case, a few scratches on the phone will go down to standard wear and tear, and cannot be expected to be the cause of overheatingt. Obviously if the scratches are deep so deep in fact the phone is in bits then they won't refund or replace.