You're right that delay() will interfere with button reading as it is "blocking" code meaning it blocks other code from running until it's finished.
You may not realize that a for loop(any loop) is also blocking code and will prevent anything outside of the loop i.e. the button from being read.
Since you haven't posted your code, I can only guess that what's needed is to implement a timing sequence to replace the delay as suggested by vaj4088 and to replace the for loop with a conditional statement( an if statement or a state machine).