Yes, this condition can cause pain and dogs can not put weight on the paw. That is why limping is seen in such situations. This condition is self treated usually within 1-2 days but it will be good if you remove piece of broken nail if present and then apply topical antibiotic. After this use bandage to cover the affected nail to avoid infection. More better is to get help from vet.