Both expressions work. The choice may depend on the situation, and there is a slight difference in meaning.
"Act on impulse" is a more general expression of acting on impulses generally. To "act on an impulse" means to take a specific action based on a specific impulse.