Yes, of course you can housetrain males to never mark indoors, though they may mark a great deal outdoors. You can also teach them not to mark outdoors while on lead unless given permission, or any other set of “rules of marking conduct” you wish to teach. I can’t imagine why you would want to teach them never to mark at all, even when unsupervised outdoors, I do think that would be tough (and pointless). However, sometimes dogs do not generalize from one house to another
(even bitches or altered animals of both sexes), so it is wise to supervise any dog closely when they are in another house, until it is clear they know what the deal is.
Sometimes males have problems with “transitional spaces” like porches, decks, patios, garages, etc., where we do not want them to mark, but once it is clarified they are usually fine. Also do be extra wary if a visiting dog has marked or urinated, or when bringing in the Christmas tree!
You may not be doing this dog any favors by showering him with attention and affection for one weekend. He will not refrain from marking in his owners’ house even if you get him started in your house. If the owners are not home during the day, he may actually be happier outdoors during the day rather than crated or closely confined, if his owners are not at home. However, perhaps you could report on your progress with him, and tell his owners how you went about house training him, so perhaps they could begin to work on doing that by having him on lead in the house in the evenings, mornings, or weekends while they are at home. He could then begin to learn not to mark in their house.
But you cannot teach him not to mark in their house in one weekend at your house. You could make a constructive beginning, though.