The error Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission occurs typically occurs when a database has been restored to a different server than the original one. This often results in a mismatch between the owner as recorded in sys.databases and the owner as recorded inside the database.
You can run this statement:
SELECT owner_sid FROM sys.databases WHERE name = 'YourDB'
UNION
SELECT sid FROM YourDB.sys.database_principals WHERE name = 'dbo'
It should only return one row, but it may return two rows if you have this mismatch.
The remedy is to set the owner of the database. It does not have to be sa. As a matter fact, I don't think it is best practice to have sa own database. A database should be owned by an SQL Login that exists only to own that databases, and which has been disabled, and which has been granted no permissions what so ever.
ALTER AUTHORIZATION ON DATABASE::YourDB TO YourDB$owner