If skills are very rare assign another person to shadow
If technical skills of developer are very rare and specific and this
developer hasn't full-time employment on one product, can he work with
other product inside other Developer Team at the same time?
As @FrancisPeixoto pointed out, team members are most productive if they focus on one thing at a time without any distractions. Even within one team, as a Scrum Master I try to keep team members from working on too many stories at a time. In other words I set a Work In Progress (WIP) limit and keep a close watch on it. So, the answer to your above question is, no you should not plan to have team members assigned to different teams "at the same time".
Having said that, sometimes I have compromised on this for practical reasons. We had a database developer who had specialized knowledge and skills. I had him assigned to help more than one team at a time. However, as @DavidArno pointed out I had other team members shadow and learn the ropes so that we don't have to continue this practice.
If "yes", whether he should attend on all Scrum events of both teams?
What if his services are needed only for part of time of second
project?
If you ask them to attend all Scrum events for both teams, you will be wasting their time and they will get furstrated. In my case, I made that person a full-fledged member in one team. In the other team, I used to coordinate offline and bring them in only to the extent they are needed.