I would like to know if a Scrum Master can be the Product Owner in Scrum?
It is possible, but not recommended by most experts I know of, as these two have conflicting roles and responsibilities. PO is focusing on getting the most bang for the bucks, while the role of SM is to help the team get to and maintain its full potential in the long term. This includes shielding the team from external discruptions and ensuring they get only as much work as they can handle.
So the PO is continually pushing the team to deliver more value, while the SM is pushing back to avoid overloading the team. If these two roles are being handled by the same person, one side usually wins over the other, resulting in imbalance.
Mike Cohn explains this with a nice historical example in his blog.
This question was also asked on Programmers.SE.
From Jeff Sutherland and Ken Schwaber's Scrum Guide (https://www.scrum.org/Portals/0/Documents/Scrum%20Guides/Scrum_Guide.pdf)
The product owner has a specific responsibility to give the team work: "No one is allowed to tell the Development Team to work from a different set of requirements, and the Development Team isn’t allowed to act on what anyone else says."
...and the Scrum Master has a specific responsibility to coach and guide (see the sections on the Scrum Master's responsibilities).
I'd add that even where the team and Product Owner do not operate in any sort of conflict, part of the Scrum Master's responsibilities include coaching the Product Owner. One can self-coach, but it's often more effective to have someone else in that role.
Normally, it is not recommended. Especially because sometimes, PO is the one introducing disturbance within the sprint with "always-super-urgent" issues, and SM is supposed to hold them off as long as possible. SM in this case has to use his negotiation skills on the PO and the stakeholders to keep the sprint disturbances as much as possible.
That being said, I did come across one scenario where I played the role of Scrum Master and "mirrored" the Product Owner.
This was due to the team being a distributed one (Offshore with 4 hours of time difference), where the development team was on one end together with me, and the PO was on the other end.
I had several one-on-one talks with the PO to have much better understanding of the product, and also various satellite issues revolving around the product, which helped in answering most of the team's questions when the PO was not directly reachable.