Yes you can rent in one place and return to the company in an other.
This of course only works with a company with locations in both places which is willing to accept it. Depending on the company they may charge extra for the different location.
Car rentals start from half a day, or even shorter, or a single day, again depending on the company. One thing to look out for with short rentals is whether they charge milage, a fee for distances more than they would expect the car to be used.
Word of warning, driving in Italy might be rather different from driving at home, if you are not used to the Italian driving style, public transport might be the better option. Trains and buses are plentiful and not expensive.