Get the animal to lie down and keep it warm. If possible, elevate the feet. It is important to keep the blood flowing to the brain and prevent heat loss. Yes, pets that have exposed skin are subject to sunburn. You can use children's nontoxic sunscreen.
Prevention is the best cure.
In the case of sunburn, consult your veterinarian for topical ointment and make sure your pet is not also suffering from heat exhaustion or heat stroke. Provide plenty of fluids. If you suspect spinal trauma, minimize the movement of the patient. Improvise a spinal board and transport the pet to the veterinarian. Keep the pet calm and quiet.