can you choose a player whose only race on the board is in decline as the one not to attack (ie he did not have an active race on his turn and could not have attacked you)
It doesn't matter whether he attacked you or not, only whether or not you attacked his active race. If he didn't have an active race on the board during your turn, then you didn't attack his active race during your turn, so at the end of your turn, you may choose him to be your Li'l Diplomat Buddy. Which means on his next turn, when he brings a new active race onto the board, he won't be able to attack your diplomatic active race.
Exception: If his declined race is ghouls, they don't pay attention to peace treaties. He can attack you with them no matter what.