In English, gender pronouns are formally used only for representations of animate beings that actually exhibit a physical gender: people and animals. Any inanimate object (or asexual lifeforms like bacteria) would be an "it," by default.
Of course, a few nouns sometimes receive the feminine pronoun. This is customary with ships and boats, as well as sometimes with nations or geographic features (the sea is often referred to with a feminine gender). This isn't required, and, in fact, most people usually refer to those nouns with "it," not with the feminine pronoun.
Additionally, individuals will sometimes personalize an object, such as a car, and assign it a gender. However, that is always a personal affectation and is not representative of the generally accepted usage. Even if your friend has named his beloved car "Eddie," you are not committing an offense to refer to the car as "it" instead of "he."
It is generally acceptable to refer to an animal as "it," particularly if the animal doesn't exhibits any recognizable or outward physical indications of gender.
That's less true if it's a specific animal you are familiar with. I.e., if you're meeting a friend's dog for the first time, it would be appropriate use "it" until you had determined the dog's gender. However, if you continued to refer to your friend's dog as "it" even after you had learned the dog was male (and thus the pronoun "he" would be used), then your friend might find that odd and impersonal. And if you referred to you friend's male dog as "she," you would likely be corrected.