Using "you" and "your" as a representation for yourself and everyone in general

Solution 1:

It's correct, informal usage of the generic you, also called the indefinite you or the impersonal you.

Here's an example of recasting a sentence to avoid the impersonal you:

You can buy this book anywhere.

This book is on sale everywhere.

The pronoun 'one' more clearly refers to people in general. It may sound a little pretentious:

One can buy this book anywhere.

Solution 2:

It's not technically incorrect, but it is a less formal usage. A more formal way to say it would be:

"I love it when one's dog just lets one sit there to pet them."

That is falling out of usage lately, especially in American English.