Do you get the war loot bonus if you get 1 star on a base that someone else has alread 3 starred?

Yes. You do.

War loot is only awarded when you successfully attack a base.

But wait. I didn't tell you enough!

Regardless of the current high score (best attack) of the base, as long as you manage to 1-star it (win the attack), you get the bonus... Even if it's already 3-started.

However, the star you gain does not count towards the score as it have already been earned (unless you beat that score of course).
Doing this only helps you if your clan is already winning, and the opponents have no chance at winning, as it is practically simply wasting your attack.

As usual, losing the war only awards 40% of the bonus.