Generally speaking, if you claim "affiliation" with some organization, they have to approve of it in some way. Explicitly, generally by naming you in some official way. Just because you work with someone at another institution doesn't affiliate you with their institution, nor them with you. It needs to be mutual and acknowledged.
I'm guessing that you don't have such a formal relationship and that the professors you work with don't have standing to create it. You are, however, affiliated with your home institution since they recognize you and the link.
If the institution provides some funding to your project you should acknowledge that somehow. Except in extraordinary cases, the salary paid to those professors wouldn't count as "funding".
But "affiliation" with individuals is a different matter, though it is normally called collaboration. If you work with Professor X at institution Y, you can fairly say you are affiliated with Professor X, but not with institution Y unless they formally agree to it.
This, I think, makes your case different from those cited by user Sursula -they-.
I've written papers with, for example, employees of IBM, but it would be foolish of me to claim I'm affiliated with that company.