it takes almost all the digital pins, and only pins 2, 9, 10, 13, and all of the analog pins free. But I need 16 pins for 8 Ultrasonic sensors.
I tried to use PCF8574 I/O expandar but someone said that it's not suitable for this task, and I myself found it really hard to code (I am a beginner).
That's OK as you need only 9 pins for your sensors. One each for trig, and if you put a diode in the echo line you can connect them all on the same pin (cathode pointing to the Arduino). You shouldn't activate more than one at a time anyway, so you know which one's echo you receive: the one you just triggered.
By the way, you may also use your port expander for the trig lines (using A4 and A5 for I2C). That works fine. Then with the echoes all combined you can go down to just three pins, and of course you can connect more stuff to your I2C bus if needed.
I'm assuming you're using the ubiquitous and cheap HC-SR04 ultrasonic distance sensors - if not, let us know which ones you have.