Should you add an XML sitemap to robots.txt?

Adding a Sitemap directive to robots.txt is a standard way to advertise the sitemap location to crawlers that read the file. Use an absolute URL, and add more than one directive if the site intentionally has separate sitemap indexes.
The directive does not make blocked or non-indexable pages eligible for search. The sitemap should list canonical URLs that return successful responses and are intended for indexing. Keep the hostname and protocol consistent with the preferred site version.
Submit the sitemap in Search Console as well when you want fetch status and indexing reports tied to that submission. Using both discovery methods is fine. After changes, open the robots file and sitemap publicly, then monitor the reported last read and errors.