That grid-like matting is sold in larger sizes, such as 4'x6'. It is not necessary to attach it to the rug; it is designed to sit between the rug and the flooring. I have seen it in sold in Home Goods stores and also at Fleet Farm in their carpeting section.
Here's one on Amazon that comes in a 4'x6' size:
https://www.amazon.com/dp/B00IAVY52U...523413219&sr=3
Edit: If you absolutely must attach it to the rug, I would just hand-stitch the grid to the rug at the corners and a few places along the edges -- just enough to keep it in place. That backing can go through the washing machine later, if necessary, although you wouldn't want to put it through the dryer (can start disintegrating).